Archive: Functions and scope


Functions and scope
Do functions maintain their own scope for the variables $[0-9] and $R[0-9]?


No, these registers are global. You have to use the stack (see the example functions).

To store global values the usage of user variales which can be declared using Var is recommended.