Positron Compiler Documentation

Local Variable and Label Names

Positron16 · Revision 1.1.3.5 · PDF page 451

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.

View original PDF page 451Open page in PDFOriginal PDF page 451