Specifications

187
Syntax:
COMMON commonvariable[,commonvariable...]
Parameter:
commonvariable
A non-array integer variable, a non-array real variable, a non-array string
variable, an array integer variable, an array real variable, or an array string
variable.
Description:
COMMON defines common variables for sharing them when one program chains to
another.
Common variables defined by
COMMON keep effective as long as programs
chained by the CHAIN statement are running.
A
COMMON statement can appear anywhere in a source program.
All of the variable name, type, quantity, and definition order of common variables
used in the current program should be identical with those in the chained-to pro-
grams. If not, variables having indefinite values will be passed.
Up to two-dimensional array variables can be defined. You can specify a sub-
script ranging from 0 to 254 for an array variable.
The total variable data size which can be passed between chained programs is 6
kilobytes including work variables.
The size of an array data is equal to the element size multiplied by the number of
elements.
You can specify the maximum string length within the range from 1 to 255 to a
string variable.
The default length of a non-array string variable is 40.
The default length of an array string variable is 20.
Declarative statement
COMMON
Declares common variables for sharing between user programs.