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. | |
UNICODE | The 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 The If |
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.