2.4.3. - Variables
global name ...-
Declares
nameto be a global symbol. A global symbol retains its value after each parsed program is executed. Ifnameis used as an array name, each element of the array is global. By appending empty square brackets tonamethe type of the symbol can be forced to be an associative array, which may be useful ifnameis to be used as an argument to a macro function before its type has been established by usage. unglobal name ...-
Makes the global or constant symbol
nameno longer global. constant name [=] expression-
Declares
nameto be a constant, global symbol having the value given byexpression. A constant symbol cannot be changed by assignment. local name ...-
Allows reuse of a preexisting name and gives the new instance
of that name scope only within the statement block
in which it is defined.
The name may be that of a macro, in which case the macro definition
is unavailable within the statement block.
By appending empty square brackets to
namethe type of the symbol can be forced to be an associative array, which may be useful ifnameis to be used as an argument to a macro function before its type has been established by usage. delete assoc-array[elem] ...-
Removes the element
elemof the associative arrayassoc-array. syms [-v] [+|-BGLADNSIC] [pattern ...]-
Lists spec's current variables.
Without arguments, all the variables are listed,
along with their
memory consumption and type.
With the
-vflag, the variables are listed along with their values in a format that can be saved to a file and read back as commands. If arguments are given aspattern, only symbols matching the arguments are printed. Such arguments may contain the?and*metacharacters.
In addition, the type of symbols listed can be controlled using the flags in the following table where a-flag prevents symbols with the given attribute from being listed and a+flag includes symbols with the given attribute in the list.BBuilt-In GGlobal LLocal AAssociative array DData array NNumber type SString type IImmutable attribute CConstant attribute
[[extern] shared] [type] array var[cols]-
Declares a one-dimensional data array.
[[extern] shared] [type] array var[rows][cols]-
Declares a two-dimensional data array.
