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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GO TO 10070 X=A*B ! Come here if A has the value 3100 WRITE (*, 20) A, B, X20 FORMAT (' ', I3, F10.4, 5X, F10.4)GOTO (Unconditional) 77The GOTO statement unconditionally transfers control to the statement with the label label. Thestatement label label must be declared within the code of the program unit containing the GOTOstatement and must be unique within that program unit.SyntaxGOTO labellabelis a statement labelExampleTOTAL=0.030 READ *, XIF (X.GE.0) THENTOTAL=TOTAL+XGOTO 30END IFIF (Arithmetic) 77(Obsolescent) The arithmetic IF statement transfers control to one of three labeled statements. Thestatement chosen depends upon the value of an arithmetic expression.SyntaxIF (arithmetic-expression) label-1, label-2, label-3Control transfers to label-1, label-2 or label-3 if the result of the evaluation of the arithmeticexpressionis less than zero, equal to zero or greater than zero respectively.ExampleIF X 10, 20, 30If X is less than zero then control is transferred to label 10. If X equals zero then control istransferred to label 20. If X is greater than zero then control is transferred to label 30.Fortran Statements 97

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

Saved successfully!

Ooh no, something went wrong!