next up previous contents
Next: Where Construct Up: Arrays Previous: Array I/O Example

Masked Array Assignment - Where Statement

This is achieved using WHERE:

    WHERE (I .NE. 0) A = B/I

the LHS of the assignment must be array valued and the mask, (the logical expression,) and the RHS of the assignment must all conform;

For example, if

displaymath44175

and,

displaymath44176

then

displaymath44177

Only the indicated elements, corresponding to the non-zero elements of I, have been assigned to.

For more information, click here gif


next up previous contents
Next: Where Construct Up: Arrays Previous: Array I/O Example

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.