Specifications

203
numericinitialvaluedefinition
For one-dimensional:
{numericconstant[,numericconstant...]}
DEFREG n6%(3)={9,8,7,6}
For two-dimensional:
{{numericconstant[,numericconstant...]}, {numer-
icconstant[,numericconstant...]} ...}
DEFREG n7(1,2)={{10,11,12},{13,14,15}}
stringinitialvaluedefinition
For one-dimensional:
{stringconstant[,stringconstant...]}
DEFREG s3$(3)={"a","bc","123","45"}
For two-dimensional:
{{stringconstant[,stringconstant...]}, {string-
constant[,stringconstant...]} ...}
DEFREG s4$(1,1)={{"a","b"},{"c","1"}}
stringlength
An integer constant from 1 to 255.
Description:
DEFREG defines non-array or array register variables.
A
DEFREG statement can appear anywhere in a source program.
Up to 2-dimensional array variables can be defined.
For both
non-arraystringvariable and arraystringvariable,
the string length can be specified.
Defaults:
stringlength for non-array variables: 40 characters
stringlength for array variables: 20 characters
The memory area for register variables is allocated in user program files in the
memory. Register variables, therefore, are always updated. An uploaded user
program, for example, contains the updated register variables if defined.
The total number of bytes allowable for register variables is 64 kilobytes.
You can specify an initial value to an array variable by enclosing it with a pair of
braces { }. No comma (,) is allowed for terminating the list of initial values.
If the number of the specified initial values is less than that of the array elements
or if no initial value is specified, then the Compiler automatically sets a zero (0) or
a null string as an initial value for a numeric variable or a string variable of the
array elements not assigned initial values, respectively.