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.

argumentis a symbolic name, starting with a letter and containing only letters anddigits. The type of argument can be REAL, INTEGER, DOUBLEPRECISION, CHARACTER, COMPLEX, or BYTE, etc.specification-partis the specification of data types for the subroutine.execution-partcontains the subprogram's executable statements.internal-subs-partcontains subprograms defined within the subroutine.DescriptionA SUBROUTINE must be terminated by an END statement. The statements and names in thesubprogram only apply to the subroutine except for subroutine or function references and thenames of COMMON blocks. Dummy arguments may be specified as * which indicates that theSUBROUTINE contains alternate returns.Recursion is allowed if the –Mrecursive option is used on the command-line and the RECURSIVEprefix is included in the function definition.ExampleSUBROUTINE DAXTIM (A, X, Y, N, M, ITER, FP, TOH)INTEGER*4 N, M, ITERREAL*8 A, X(N,M), Y(N,M), FP, TOH...END SUBROUTINE DAXTIMSee AlsoPURE, RECURSIVETARGET 90The TARGET specification statement (attribute) specifies that a data type may be the object of apointer variable (e.g., pointed to by a pointer variable). Likewise, types that do not have theTARGET attribute cannot be the target of a pointer variable.SyntaxTARGET [ :: ] object-name [(array-spec)][, object-name [(array-spec)]]...136 Chapter 3

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

Saved successfully!

Ooh no, something went wrong!