DEFINES ONE OR SEVERAL VARIABLES INSIDE A SUBROUTINE OR FUNCTION
ACTION
The command defines one or several variables, simple or in array.
A variable name can contain letters, the character underscore ("_") or numbers, but the first character must be a letter.
A variable can be one out the 3 types : integer, real, string.
The type of a variable is defined by the last character of its name :
% for an integer variable
$ for a string variable
neither % nor $ for a real variable
An array is defined with its maximal number of elements.
SYNTAX:
DIM_LOCAL V1[,Vn]
USE ERROR EXAMPLE
dim a%(20),i%
for i%=1 to 10:a%(i%)=i%:next i%
for i%=1 to 10
to_printer(a%(i%))
next i%
end
sub to_printer(j%)
dim_local a%(20),i%
for i%=1 to 10:a%(i%)=100:next i%
print j%
end_sub
DIM_LOCAL
DIM_LOCAL V
SEE ALSO
ADR()
DIM
FREE