Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jassing
Addict
Posts: 1885 Joined: Wed Feb 17, 2010 12:00 am
Post
by jassing » Fri May 24, 2024 2:28 pm
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()
breeze4me
Enthusiast
Posts: 633 Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor
Post
by breeze4me » Fri May 24, 2024 4:53 pm
Something like this.
Code: Select all
DataSection
! int blah(int i) { return( i*2 ); }
EndDataSection
Procedure hmm()
! return( blah(3) ); // << unresolved
EndProcedure
Debug hmm()
jassing
Addict
Posts: 1885 Joined: Wed Feb 17, 2010 12:00 am
Post
by jassing » Fri May 24, 2024 5:41 pm
breeze4me wrote: Fri May 24, 2024 4:53 pm
Something like this.
PERFECT!
That would never have occurred to me! Slick!!!
Thank you!
jassing
Addict
Posts: 1885 Joined: Wed Feb 17, 2010 12:00 am
Post
by jassing » Fri May 24, 2024 7:07 pm
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!
idle
Always Here
Posts: 5840 Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand
Post
by idle » Fri May 24, 2024 9:03 pm
That's a sneaky solution.