Chapter
10
I
BASIC
Keywords
COMMON
Statement
COMMON
uariabZe[,uariabZe,.
.
.I
Passes
Variables
to
a
chained program.
Both programs in the chain should contain a COMMON state-
ment. COMMON may appear anywhere in a program, but we
recommend using
it
at
the beginning.
The same variable cannot appear in more than one COMMON
statement in
a
single program. The size and order
of
the vari-
ables must be the same in the programs being chained. To spec-
ify array variables, append
“0”
to the variable name. If you are
passing all variables, use CHAIN with the ALL option and omit
the COMMON statement.
Note:
Array variables used in
a
COMMON statement
must have been declared in a DIM statement.
See the CHAIN statement for more information on passing
variables.
Example
90
DIM
D(50)
100
COMMON
A,
E,
C,
DO,G$
11
0
CHFI
IN
”PROG3”, 10
Line 100 passes variables A, B, C, D, and
G$
to the CHAIN
command in Line 110.
126