Welcome to AE Resources
Converted document Converted document

FORTRAN 90+: WHERE STATEMENTS

The WHERE statement is meant to make operations on data sets where a certain characteristic is true. This may mean only carrying out operations on an array where the values are greater than zero, or using the values of another array to decide which values to keep. The basic format is
WHERE (.TRUE. .FALSE. statement)
          operation
ELSEWHERE  !optional
          operation
END WHERE