Introduces optional ELSEWHERE block within a WHERE construct.
Syntax
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”.