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.

RETURN 77The RETURN statement causes a return to the statement following a CALL when used in asubroutine, and returns to the relevant arithmetic expression when used in a function.SyntaxRETURNAlternate RETURN(Obsolescent) The alternate RETURN statement is obsolescent for HPF and Fortran 90/95. Use theCASE statement where possible in new or updated code. The alternate RETURN statement takesthe following form:RETURN expressionExampleexpressionexpression is converted to integer if necessary (expression may be oftype integer or real). If the value of expression is greater than or equalto 1 and less than or equal to the number of asterisks in theSUBROUTINE or subroutine ENTRY statement then the value ofexpression identifies the nth asterisk in the actual argument list andcontrol is returned to that statement.SUBROUTINE FIX (A,B,*,*,C)40 IF (T) 50, 60, 7050 RETURN60 RETURN 170 RETURN 2ENDPROGRAM FIXITCALL FIX(X, Y, *100, *200, S)WRITE(*,5) X, S ! Come here if (T) < 0STOP100 WRITE(*, 10) X, Y ! Come here if (T) = 0STOP200 WRITE(*,20) Y, S ! Come here if (T) > 0130 Chapter 3

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

Saved successfully!

Ooh no, something went wrong!