12.07.2015 Views

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

First, compute the valid set of index values. Second, compute the active set of index values,taking into consideration the scalar-mask-expr. If no scalar-mask-expr is present, the valid set isthe same as the active set of index values. Third, for each index value, the right-hand side of thebody of the FORALL is computed. Finally, the right-hand side is assigned to the left-hand side, foreach index value.ExamplesFORALL (I = 1:3) A(I) = B(I)FORALL(I = 1:L, A(I) == 0.0) A(I) = R(I)FORALL (I = 1:3)A(I) = D(I)B(I) = C(I) * 2END FORALLFORALL (I = 1:5)WHERE (A(I,:) /= 0.0)A(I,:) = A(I-1,:) + A(I+1,:)ELSEWHEREB(I,:) = A(6-I,:)END WHEREEND FORALLFORMAT 77The FORMAT statement specifies format requirements for input or output.Syntaxlabel FORMAT (list-items)list-itemscan be any of the following, separated by commas:• Repeatable editor commands which may or may not be precededby an integer constant which defines the number of repeats.• Nonrepeatable editor commands.• A format specification list optionally preceded by an integerconstant which defines the number of repeats.Each action of format control depends on the next edit code and the next item in the input/outputlist where one is used. If an input/output list contains at least one item there must be at least onerepeatable edit code in the format specification. An empty format specification () can only be usedFortran Statements 91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!