SWITCH real-valued function SWITCH real-valued function Syntax SWITCH (switch_name) SWITCH (switch_name[ index ]) Function Return an indication of the setting of a system switch. Parameters switch_name Name of the system switch of interest (see below). index For switches that can be qualified by an index, this is a (required) real value, variable, or expression that specifies the specific switch element of interest. Details This function returns FALSE (0.0) if the specified switch is disabled. Otherwise, TRUE (-1) is returned. The switch name can be abbreviated to the minimum length that identifies it uniquely.
For details on switch names, see the section Switches in the eV+ Language User's Guide . Other system switches are available when options are installed. Refer to the option documentation for details. For example, the switches associated with the AdeptVision options are described in the AdeptVision Reference Guide . Example This program segment checks whether the DRY.RUN switch is enabled. If it is, a message is displayed on the system terminal: IF SWITCH(DRY.RUN) THEN TYPE "DRY RUN mode is enabled" END Related Keywords DISABLE monitor command DISABLE program instruction ENABLE monitor command eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 515