ELSEWHERE

Statement: Marks the beginning of an ELSEWHERE block within a WHERE construct.

Syntax

[name:] WHERE (mask-expr1)
     [where-body-stmt] ...
[ELSEWHERE (mask-expr2) [name]
     [where-body-stmt] ...]
[ELSEWHERE [name]
     [where-body-stmt] ...]
END WHERE [name]

name
Is the name of the WHERE construct.


mask-expr1, mask-expr2
Are logical array expressions (called mask expressions).

where-body-stmt
Is one of the following:

Rules and Behavior

Every assignment statement following the ELSEWHERE is executed as if it were a WHERE statement with ".NOT. mask-expr1". If ELSEWHERE specifies "mask-expr2", it is executed as "(.NOT. mask-expr1) .AND. mask-expr2" during the processing of the ELSEWHERE statement.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: WHERE

Example

WHERE (pressure <= 1.0)
  pressure = pressure + inc_pressure
  temp = temp - 5.0
ELSEWHERE
  raining = .TRUE.
END WHERE

The variables temp, pressure, and raining are all arrays.