◄Up► ◄Contents► ◄Index► ◄Back► ─────$ELSEIF──────────────────────────────────────────────────────────────── Action Causes compilation of a block of statements if <expression> is .TRUE. and the matching $IF metacommand is .FALSE. Syntax $ELSEIF (expression) Parameter Description expression A logical expression Remarks The logical expression in a $ELSEIF metacommand can take two forms. One is the conditional-compilation operator DEFINED, followed by a symbol name in parentheses. The second form is a logical comparison, where the value of the symbol is compared with an integer constant or the value of another symbol. Example $DEFINE flag $DEFINE testval = 3 $IF (.NOT. DEFINED (flag)) WRITE (*, '('' Compiled if flag not DEFINED'')') $ELSEIF (testval .GT. 3) WRITE (*, '('' Compiled if flag DEFINED .AND. testval +.GT. 3'')') $ELSE WRITE (*, '('' Compiled if flag DEFINED .AND. testval +.LE. 3'')') $ENDIF $ENDIF -♦-