IF (If)

自由形式構文 IF{(MR) } 標識式
コード 演算項目 1 拡張演算項目 2
IF (M/R) ブランク 標識式

IF では、条件が満たされた場合に一連の命令コードを処理することができます。 その機能は IFxx 命令コードの機能と似ています。相違点は、標識の値を示す式 (標識式) によって論理条件が表されることです。IF 命令で制御される操作は、標識式 オペランドの式が真になった時に実行されます。命令拡張 M および R が どのように使用されるかについては、数値演算の精度の規則を参照してください。

詳細については、構造化プログラミング命令を参照してください。

図 1. IF 命令
CL0N01Factor1+++++++Opcode(E)+Extended-factor2+++++++++++++++++++++++++++..
C                             Extended-factor2-continuation+++++++++++++++
 * The operations controlled by the IF operation are performed
 * when the expression is true.  That is A is greater than 10 and
 * indicator 20 is on.
C
C                   IF        A>10 AND *IN(20)
C                   :
C                   ENDIF
 *
 * The operations controlled by the IF operation are performed
 * when Date1 represents a later date then Date2
C
C                   IF        Date1 > Date2
C                   :
C                   ENDIF
 *