XL Fortran for AIX 8.1

Language Reference

ELSE

Purpose

The ELSE statement is the first statement of the optional ELSE block within an IF construct.

Format



>>-ELSE--+-------------------+---------------------------------><
         '-IF_construct_name-'
 
 

IF_construct_name
is a name that identifies the IF construct

Format

Control branches to the ELSE block if every previous logical expression in the IF construct evaluates as false. The statement block of the ELSE block is executed and the IF construct is complete.

If you specify an IF_construct_name, it must be the same name that you specified in the block IF statement.

Examples

    IF (A.GT.0) THEN
      B = B-A
    ELSE            ! the next statement is executed if a<=0
      B = B+A
    END IF

Related Information


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]