Switch, Syserr – Xerox -05W User Manual

Page 264

Advertising
background image

12-60

Creating A Script File

SWITCH

Syntax: (See below)

This is used to compare the value of a variable with a list of possible values and
perform the commands specified for the matching case. The format is as follows:

SWITCH <variable>
{
CASE <value1>
<commands>
CASE <value2> [<value3>...]
<commands>
[DEFAULT
<commands>]
}

where

<variable>

can be a string, integer or floating point variable containing the
value to be matched.

{ and }

mark the beginning and the end of the switch sequence. These
must not be omitted.

CASE <value#> specifies a possible value for the variable, which can be a literal

string, a variable or a number. Note that you can specify more than
one value on the same line by separating each value by a comma
and/or space. If the value of the variable matches the case value
then the <commands> on the following line(s) will be performed.

<commands>

specifies what the program must do if the case value on the
previous line matches the variable value. On a successful match the
program performs the specified commands and exits the switch
process.

DEFAULT

this is an optional entry which will cause the program to perform
the following commands and exit the switch process if the variable
value was not matched with any of the case values.

SYSERR

Syntax: SYSERR <boolean>

This is used to enable or disable the display of error message boxes. The boolean
value may be 0 or 1, No or Yes, False or True, OFF or ON. The value may be
abbreviated to the characters shown in uppercase.

Advertising
This manual is related to the following products: