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.

Syntax

Local DECLARATION1 VARIABLE(DIMENSIONS)Local DECLARATION2 VARIABLE(SIZE)(DIMENSIONS)Local Instance VARIABLE Using CLASSLocal Instance VARIABLE(DIMENSIONS) Using CLASSDefault Local

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.

Examples

Local Char TEMPORARY_STRING(100)Local Instance MYORDER Using C_ORDERLocal TinyInt BYTES_BUFFER(1..1024)

See also

Global, Variable, Value, Const, Tinyint, Libelle, Date, Shortint, Integer, Float, Double, Decimal, Char, Schar, Clbfile, Blbfile, Uuident, Datetime, Instance.