Script Syntax: Flow Control Keywords
The following Flow Control keywords are used in a script to return "error" or "success" responses of steps within that script.
- . This checks for the current state (ok or error) and jumps to a label if true.
Valid syntax: IfState {ERR|OK} label
Example:
IfState ERR End
IfState OK Bye
- . This immediately jumps to a label.
Valid syntax: Goto End
Example:
Goto End
- . This immediately ends the script with an optional state (ok or error). The optional state overrides the current state.
Valid syntax: Exit {ERR|OK}
Example:
Exit ERR
Exit OK
- . This defines a label that can be the target of a jump. A label is defined by a single word beginning with the ":" character.
Valid syntax: :
(with a name following)
Example:
Bye
- . This allows for a global handling of an error situation
Valid Syntax: OnError {EXIT|CONTINUE|GOTO} label
Example:
OnError EXIT (Default behavior)
OnError CONTINUE
OnError GOTO Logoff