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.

ExampleslistASSIGN 50 TO KGO TO K(50,90)90 G=D**5..50 F=R/Tstatement within the same program unit. This type of definition canonly be done by the ASSIGN statement.consists of one or more statement labels attached to executablestatements in the same program unit. If a list of statement labels ispresent, the statement label assigned to the integer variable must be inthat list.GOTO (Computed) 77The computed GOTO statement allows transfer of control to one of a list of labels according to thevalue of an expression.SyntaxGOTO (list) [,] expressionExamplelistexpressionis a list of labels separated by commas.selects the label from the list to which to transfer control. Thus a valueof 1 implies the first label in the list, a value of 2 implies the secondlabel and so on. An expression value outside the range will result intransfer of control to the statement following the computed GOTOstatement.READ *, A, BGO TO (50,60,70)AWRITE (*, 10) A, B10 FORMAT (' ', I3, F10.4, 5X, 'A must be 1, 2+ or 3')STOP50 X=A**B ! Come here if A has the value 1GO TO 10060 X=(A*56)*(B/3) ! Come here if A is 296 Chapter 3

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

Saved successfully!

Ooh no, something went wrong!