5.20
DO
SYNTAX
DO command file [parameter list]
DESCRIPTION
DO
Executes commands from file command file.
The file is read
into a dynamically allocated
buffer~
Each command line (as
terminated by a carriage return) is then expanded according
to the presence of certain expansion control symbols.
A 'parameter string' is a group of symbols delimited by
either a blank (20H), comma (2CH), horizontal tab ·(09H),
left parenthesis (28H), right parenthesis (29H), semicolon
(3BH) , or carriage return (ODH).
Simple parameter substitution is made for each occurrence
of the string lin', where n is an integer less than or
equal to the number of parameters given.
If n is greater
than the number of parameters given, a Command Expansion
Error is generated and processing is terminated.
For each
lin', the nth parameter string from the parameter list is
substituted. A maximum of 64 parameter strings may be
passed in this manner.
Parameters which are present but
not referenced are ignored.
Conditional expansion of the command line can be controlled
by the symbol pair '[' and ']'. ", ' At each occurrence of '[',
the depth of conditional expansion increases by one.
If
the resultant depth is greater than the number of
parameters given, the command line is scanned over until
the matching ']' is located.
If the resultant depth is not
greater than the number of parameters given, the' [' is
deleted from the command string and expansion continued.
At each occurrence of ']', the depth of conditional
expansion decreases by one. Thus, the command string
'AB[C]DE' would expand into 'ABCDE' only if at least one
parameter were given.
Otherwise, the resultant command
string (after expansion) would be 'ABDE'.
Note that
parameters may control command string expansion regardless
-
75 -
Need help?
Do you have a question about the Z80-RIO and is the answer not in the manual?
Questions and answers