Local
This keyword is used as a prefix to declare local variables. Local variables have a duration and visibility scope limited to a Call, fmet, and func call.
A local variable is created in the [L] class. Once created, it will persist until the End instruction is encountered, or if it is destroyed by the use of the Kill instruction. The local variables are shared with code that is called by a Gosub instruction.
Local DECLARATION1 VARIABLE(DIMENSIONS)Local DECLARATION2 VARIABLE(SIZE)(DIMENSIONS)Local Instance VARIABLE Using CLASSLocal Instance VARIABLE(DIMENSIONS) Using CLASSDefault Local
DECLARATION1
may be one of the following keywords: Tinyint, Libelle, Date, Float, Double, Decimal, Datetime, or Uuident.DECLARATION2
may be one of the following keywords: Char, Schar, Clbfile, or Blbfile.SIZE
is a numeric value.DIMENSIONS
can be:CLASS
is a class code, which refers to the class or representation dictionary.Default Local
is a declaration that sets up the fact that a declaration without Global or Local Keyword will be considered as global. This type of syntax should also be avoided because it makes ambiguous the scope of the created variable.
Local Char TEMPORARY_STRING(100)Local Instance MYORDER Using C_ORDERLocal TinyInt BYTES_BUFFER(1..1024)
Global, Variable, Value, Const, Tinyint, Libelle, Date, Shortint, Integer, Float, Double, Decimal, Char, Schar, Clbfile, Blbfile, Uuident, Datetime, Instance.