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.

IF (Block) 77The block IF statement consists of a series of statements that are conditionally executed.SyntaxIF logical expression THENstatementsELSE IF logical expression THENstatementsELSEstatementsEND IFThe ELSE IF section is optional and may be repeated any number of times. Other IF blocks maybe nested within the statements section of an ELSE IF block.The ELSE section is optional and may occur only once. Other IF blocks may be nested within thestatements section of an ELSE block.ExampleIF (I.GT.70) THENM=1ELSE IF (I.LT.5) THENM=2ELSE IF (I.LT.16) THENM=3END IFIF (I.LT.15) THENM = 4ELSEM=5END IFIF (Logical) 77The logical IF statement executes or does not execute a statement based on the value of a logicalexpression.SyntaxIF (logical-expression) statement98 Chapter 3

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

Saved successfully!

Ooh no, something went wrong!