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 5) - Query EDT parameter settings

&pagelevel(3)&pagelevel

This format of the @IF statement can be used in EDT procedures or in L mode to query the operating mode that is currently set (see section “Introduction to the EDT operating modes”). Depending on the result, a specified string either is or is not processed as input.

Operation

Operands

L mode

@IF

OPERATING-MODE = { UNICODE |  COMPATIB-} :[text]

OPERATING-MODE=

The EDT operating mode is checked.
UNICODEThe condition is fulfilled if EDT is in Unicode mode.
COMPATIBLE

The condition is fulfilled if EDT is in compatibility mode.

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

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

Example

1.     @IF OP = C : @GOTO 5
2.     @SET #S2 = 'PROCEDURE ONLY RUNS IN COMPATIBILITY MODE'
3.     @PRINT #S2 N
4.     @HALT
5.     @CONTINUE
6.     ...other statements


The procedure results in the abnormal termination of EDT if it is not running in compatibility mode.