24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>FORTRAN</strong> Statements<br />

2.52 Block IF Statement<br />

There are two forms of the block IF statement. The second is a <strong>Open</strong> <strong>Watcom</strong> <strong>FORTRAN</strong> <strong>77</strong> extension.<br />

2.52.1 Standard Block IF Statement<br />

<br />

IF (e) THEN<br />

where:<br />

e<br />

is a logical expression.<br />

The block IF statement is used in conjunction with the ELSE IF, ELSE, and END IF statements.<br />

Example:<br />

IF( A .LT. B )THEN<br />

PRINT *, ’A < B’<br />

END IF<br />

For more information, see the chapter entitled "Program Structure Control Statements" on page 193.<br />

2.52.2 Extended Block IF Statement<br />

IF (e) THEN<br />

[: block-label]<br />

where:<br />

e<br />

block-label<br />

is a logical expression or integer arithmetic expression, in which case the result<br />

of the integer expression is compared for inequality to the integer value 0.<br />

is an optional block label.<br />

This form of the block IF statement is an extension to the <strong>FORTRAN</strong> <strong>77</strong> language. It is identical to the<br />

standard form of the block IF statement with the exception that an integer arithmetic expression and an<br />

optional block label are permitted.<br />

Example:<br />

Block IF Statement 87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!