Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Determining if variable or static string is passed to a Sub
#2
SUB SomeRoutine (a$, state)
   IF state THEN PRINT "Variable" ELSE PRINT }Static"
END SUB

Then just send the sub a call with the flag desired.

SomeRoutine a$, -1
SomeRoutine "Hello World", 0

There's no auto detection, but it's simple enough to pass a flag with that information.
Reply


Messages In This Thread
RE: Determining if variable or static string is passed to a Sub - by SMcNeill - 05-21-2025, 05:59 PM



Users browsing this thread: 1 Guest(s)