AT&T 6300 Programmer's Manual page 213

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

Example
COMMON
Statement
Common variables must always be initialized
within the CHAINing program. Common
arrays must be explicitly described by DIM
statements in the CHAINing program (but not
in the CHAINed program, otherwise a
"Duplicate definition" error occurs). The DIM
statements must be written before the
associated COMMON statements.
10 REM PG1
20 COMMON A1,B1,C1,D1S
80 CHAIN uA:PG2
JJ
90 END
10 REM PG2
20 PRINT A1,B1,C1,D1S
120 END
The above example shows that the CHAINed
program need not specify, through the use of
COMMON statements, the common variables
specified by the CHAINing program.
In our example the values of the variables AI,
BI, CI, and DI$ in the program PG1 are
passed to the CHAINed program PG2, which
displays them.
7-57

Advertisement

Table of Contents
loading

Table of Contents