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

ELSEWHERE

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

Introduces optional ELSEWHERE block within a WHERE construct.

Syntax

ELSEWHERE

Description

The ELSEWHERE statement introduces an ELSEWHERE block, which is an optional component of the WHERE construct. The ELSEWHERE statement executes on the complement of the WHERE condition. For additional information, see “WHERE (statement and construct)”.

Examples

WHERE( b .GE. 0.0 )
! Assign to sqrt_b only where logical array b is 0 or positive
sqrt_b = SQRT(b)
ELSEWHERE
sqrt_b = 0.0 ! Assign sqrt_b where b is negative
END WHERE

Related statements

WHERE and END (construct)

Related concepts

For information about the WHERE construct, see “Masked array assignment”.

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