ELSEIF (Else If)
Free-Form Syntax | ELSEIF{(MR)} indicator-expression |
Code | Factor 1 | Extended Factor 2 | ||||
---|---|---|---|---|---|---|
ELSEIF (M/R) | Blank | indicator-expression |
The ELSEIF operation is the combination of an ELSE operation and an IF operation. It avoids the need for an additional level of nesting.
The IF operation code allows a series of operation codes to be processed if a condition is met. Its function is similar to that of the IFxx operation code. It differs in that the logical condition is expressed by an indicator valued expression (indicator-expression). The operations controlled by the ELSEIF operation are performed when the expression in the indicator-expression operand is true (and the expression for the previous IF or ELSEIF statement was false).
For information on how operation extenders M and R are used, see Precision Rules for Numeric Operations.
For more information, see Structured Programming Operations.