Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Fortran 90 Programmer's Reference: HP Fortran 90 Programmer's Reference > Chapter 10 HP Fortran 90 statements

IF (logical)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

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”.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.