Previous Next Chapter

Condition Flags

Conditions flags indicate the condition upon which a particular command stops running. Then commands are executed, return codes report if they succeeded or failed. The standard return codes are:

0

The command succeeded.

5

Represents a caution, usually indicating that some type of error occurred. The error, however, was not serious enough to abort the command. If the command is part of a script, subsequent commands are executed. Several commands set the condition flag to WARN to specify a non-error command outcome.

10

Represents an error. A return code of 10 aborts a script, unless a higher limit has been set with the FAILAT command.

20

Represents a failure.

Other values may be returned by applications. In such cases, the previously listed values are considered lower limits of the specified condition as follows:

0-4

No Error

5-9

Warn

10-19

Error

20 or above

Failure

Some commands, such as ASK and SEARCH, use the WARN flag to signal certain conditions for testing in scripts.

For example, in the COPY script on page 5-12, the ASK command requests confirmation to continue the copy:

ASK "Continue Copy?"
IF WARN
COPY 3a.eps DF0:

Pressing y sets the condition flag to 5 (WARN), executing the IF block. Pressing N or Return sets the condition flag to 0 (NO ERROR), aborting the script because the IF statement did not receive the specified return code.

Top Previous Next Chapter