|
there are no functions in pbasic. The closest you have is subroutines accessed by gosub. You can not pass parameters to subroutines and so, you must use global variables.
If you wanted to get fancy, you could use part of the scratchpad memory as a stack, and push function parameters onto it just like a c compiler does, but you are asking for trouble, and it would take time.
|