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.

DOA(I)=A(I)+1IF (A(I).EQ.4) EXITEND DODO I=1,NA(I)=A(I)+1END DODO WHILE 77The DO WHILE statement introduces a logical do loop and specifies the loop control expression.The DO WHILE statement executes for as long as the logical expression continues to be true whentested at the beginning of each iteration. If expression is false, control transfers to the statementfollowing the loop.SyntaxDO [label[,]] WHILE expressionThe end of the loop is specified in the same way as for an iterative loop, either with a labeledstatement or an END DO.labelexpressionlabels the last executable statement in the loop (this must not be atransfer of control).is a logical expression and label.DescriptionThe logical expression is evaluated. If it is .FALSE., the loop is not entered. If it is .TRUE., theloop is executed once. Then logical expression is evaluated again, and the cycle is repeated untilthe expression evaluates .FALSE.ExampleDO WHILE (K == 0)SUM = SUM + XEND DOFortran Statements 77

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

Saved successfully!

Ooh no, something went wrong!