<WHERE Example Program>
Program where_construct_example Real a(2,2) a = Reshape( (/-1.,2.,3.,4./), (/2,2/)) Where (a<0.) a = 0.0 Elsewhere (a>3.) a = 1.0 Elsewhere a = 10*a End Where Print *, a(1,:) Print *, a(2,:) End Program
■ Execution Results
0.0000000 30.0000000 20.0000000 1.0000000