English
Language : 

NSB8 Datasheet, PDF (36/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
grifo®
CHAIN
ITALIAN TECHNOLOGY
STATEMENT:
CHAIN "<program file name>"
ACTION:
The BASIC program contained in the specified file is automatically loaded into the program/data
area from diskette (replacing any current program), then automatically begins running at the lowest
numbered program line. The program file name must be a string expression which evaluates to a legal
tokenized BASIC program file name, as described in section FILES.
EXAMPLES:
10 CHAIN “PROG.B,2”
100 CHAIN P$ + D$
200 CHAIN “PROG” + N$ (X,X) + ”,2 “
REMARKS:
CHAIN makes possible the automatic sequencing of 2 or more programs, freeing the operator from
the task of having to LOAD and RUN each new program as the previous one ends. A CHAIN statement
in program A, for example, may automatically initiate program B; a CHAIN in B may lead to C, and
so on.
After a successful CHAIN, any previous program and data are cleared. All files currently open in the
calling program are automatically closed.
Communication between chained programs may be facilitated by the use of common data files, or
by use of EXAM and FILL.
Bacause CHIAN is a direct statement, it may be used instead of the LOAD-RUN sequence for manual
program initiation. However, remember that the file name in a CHAIN statement is a string
expression, and that string constants must always be enclosed by double quotes (e.g.: CHAIN
“PROG” is legal, but CHAIN PROG is not).
ERROR MESSAGES:
Same as command LOAD
SEE ALSO:
Section CHAINING
Command LOAD
Command RUN
Page 24
NSB8
Rel. 5.10