Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@IF (format 1) - Query error switches

&pagelevel(3)&pagelevel

This format of the @IF statement can be used in EDT procedures and in L mode to check whether EDT or DMS errors have already occurred. Depending on the result, a specified string either is or is not processed as input.

EDT errors may occur, for example, if an incorrect EDT statement is entered. The DMS error switch can be set for statements which access files (e.g. @WRITE, format 1) or may indicate system access errors.

Operation

Operands

L mode

@IF

{ERRORS
| NO [ERRORS]
DMS [ERRORS]
| NO DMS [ERRORS]} :[text]

ERRORSThe condition is fulfilled if the EDT error switch is set.
NO ERRORSThe condition is fulfilled if the EDT error switch is not set.
DMS ERRORSThe condition is fulfilled if the DMS error switch is set.
NO DMS ERRORS

The condition is fulfilled if the DMS error switch is not set.

text

EDT statement or data line. If the condition is fulfilled, the string is treated
as if it had been entered at the prompt in L mode. In particular, the decision
to interpret the text as data input or as a statement is made in accordance
with the same rules (for more information, see section “L mode”).

The text operand starts immediately after the character ':', i.e. any
specified blanks form part of the operand and are taken over into the line in
the case of data input.

If text is not specified (although the colon is), then an empty line (line of
length 0) is inserted.

Note

If a specific statement is to be checked then the error switch must be reset before the relevant statement (see @RESET). Otherwise the @IF statement may return an unwanted result since earlier statements may have already set the EDT or DMS switch.

The @IF ERRORS statement should not be used to query hits after @ON. @IF format 3 should be used for this.

Using @IF with @RETURN as a statement outside of procedures may cause EDT to terminate (see the @RETURN statement).