Xerox -07W & -11W Printer User Manual


 
12-65
Creating A Script File
var !float 0.45
All future references to a variable are made by using its name without the $, % or !
variable type identifying characters.
Note: You can convert the type of data (string, integer, floating
point number) from one variable to another using conv.
You can specify more than one variable name (and value) on the same line. Variable
names are linked to their assigned values by an equals sign (spaces are optional), and
each variable name (with value) is separated from the next by a comma or/and space.
For example:
var %integer1 = 32, %integer2, $string1 = "Hello", $string2
Variables that are not assigned a value will be given NULL for strings or 0 (zero).
You can incorporate a special variable called errno in your script file which will be
used to store a number indicating the result of a command (i.e. success or type of
failure). The errno variable is an integer variable which is already defined as part of
the script language, that is, you do not need to use the var command to include it in
your script file. When the command is successful, the number 0 will be assigned to
errno. Refer to the section entitled Error Numbers later in this chapter for more
details.
WAIT
Syntax: WAIT <time>
Causes the host to wait for the specified time in seconds. The default time is one
second.
WHILE
Syntax: WHILE <condition>
Informs the program to perform the command(s) on the following line(s) while the
specified condition is true. For example:
while (integer < 10)
inc integer
If more than one command line is to be associated with while, insert a line containing
the { (open curly brace) character before the first command line and a line containing
the } (close curly brace) character following the last command line.
For example:
while (integer < 10)
{
inc integer