HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
IF (logical)
Chapter 10370
IF (logical)
Conditionally executes a statement.
Syntax
IF (
logical-expression
)
statement
logical-expression
is a logical expression.
statement
is any executable statement other than the following:
A statement used to begin a construct
Any END statement
Any IF statement
Description
The logical IF statement is a two-way decision maker. If
logical-expression
evaluates to is
true,
statement
executes and control passes to the next statement. If
logical-expression
evaluates to false,
statement
does not execute and control passes to the next statement in the
program.
Examples
IF (a .EQ. b) PRINT *, 'They are equal.'
Related statements
IF (arithmetic) and IF (construct)
Related concepts
For information about flow control statements, see “Flow control statements” on page 146.