80
•
skipping empty and comment lines;
•
replacing variables with their specific values;
•
echoing non-empty lines to the screen (if echo is enabled);
•
interpreting PC-CDU internal commands, and;
•
sending commands to the receiver and (optionally) waiting for receiver replies.
To abort the script execution, click the
Stop script
button.
Variables
Variables are special character sequences that are substituted for some specific values
22
while run-
ning the script. Currently PC-CDU supports the following variables: @1, @2, … @9, and @0.
The first nine of these variables initially contain the values of the script's command line arguments.
With the command
@default
,
you can assign the default values to these variables unless the corre-
sponding arguments have already been specified through the script command line. Also, you may
use the
@set
command to change the variables' values.
The variable @0, which is read-only, has a special purpose. Initially it contains the script name
specified in the command line. In the course of script execution, it will either contain the last of the
receiver's positive acknowledgements (i.e., the most recent of the
RExxx
replies), or remain empty.
After getting
RExxx
from the receiver, PC-CDU will search the received sequence for the last of the
'%' symbols it contains. PC-CDU does not assign to the variable @0 the entire
RExxx
reply, but only
the characters following immediately after the last '%' symbol (until the end of this sequence is
found). Leading and trailing spaces are trimmed. With the
@set
command, you can assign the value
of @0 to other variables.
Any line beginning with '#' (hash) is considered a comment and is ignored by PC-
CDU script interpreter.
PC-CDU commands
Any line starting with the '@' character is interpreted as a PC-CDU command with optional argu-
ments separated by commas or spaces. In table below, you will find the description of supported
commands.
Table 9. List of PC-CDU commands
Command Arguments
Description
:<label
name>
Specifies a label.
Label names should not contain spaces or commas. See the
goto command for how to use labels.
call
<script name> [<argu-
ments>]
Calls another script.
The maximum number of recursive calls is 200.
22
specified by the user and stored by PC-CDU