Local Variable and Label Names
Positron8 · Revision 4.0.6.5 · PDF page 456
Any label, constant or variable created within a procedure is local to that procedure only. Meaning that it is only visible within the procedure, even if the name is the same as other variables created in other procedures, or global constants or variables. A local variable is created exactly the same as global variables. i.e. using Dim:
Proc MyProc(pMyByte as Byte)
Dim MyLocal as Byte ' Create a local byte variable
MyLocal = pMyByte ' Load the local variable with parameter variable
EndProc
Note that a local variable's name must consist of more than 1 character. The same limitations are applied to local names as they are too parameter names. They are matched dynamically to the procedure name so that their combined length does not exceed 32 characters. An error will be produced if the length exceeds 32 and will inform the user as to its maximum length allowed.
