Page 1 of 1
C backend/declaring functions.
Posted: Fri May 24, 2024 2:28 pm
by jassing
Any chance of this ever being doable?
Code: Select all
! int blah(int i) { return( i*2 ); }
Procedure hmm()
! return( blah(3) ); // << unresolved
EndProcedure
Debug hmm()
Re: C backend/declaring functions.
Posted: Fri May 24, 2024 4:53 pm
by breeze4me
Something like this.
Code: Select all
DataSection
! int blah(int i) { return( i*2 ); }
EndDataSection
Procedure hmm()
! return( blah(3) ); // << unresolved
EndProcedure
Debug hmm()
Re: C backend/declaring functions.
Posted: Fri May 24, 2024 5:41 pm
by jassing
breeze4me wrote: Fri May 24, 2024 4:53 pm
Something like this.
PERFECT!
That would never have occurred to me! Slick!!!
Thank you!
Re: C backend/declaring functions.
Posted: Fri May 24, 2024 7:07 pm
by jassing
Not so perfect. A good idea, better than what I had been doing (repeating code).
It can break the program/module "Barrier" & using a label can cause problems with compile time. (easy enough to get around it by adding "data.b 0" after the label.
still, better than where I was this morning!
Re: C backend/declaring functions.
Posted: Fri May 24, 2024 9:03 pm
by idle
That's a sneaky solution.
