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.

SUBROUTINE TRIG (X,F,Y)Y=F(X)RETURNENDFUNCTION MYOWNMYOWN=COS(X)/SIN(X)RETURNENDIn this example, when TRIG is called with a second argument of SIN or COS the functionreference F(X) references the intrinsic functions SIN and COS; however when TRIG is calledwith MYOWN as the second argument F(X) references the user function MYOWN.LOGICAL 77The LOGICAL statement establishes the data type of a variable by explicitly attaching the name ofa variable to an integer data type. This overrides the implication of data typing by the initial letterof a symbolic name.SyntaxThe syntax for LOGICAL has two forms, a standard FORTRAN 77 and 90/95 attributed form, andthe <strong>PGI</strong> extended form. This section describes both syntax forms.LOGICAL [ ( [ KIND = kind-value ) ] [, attribute-list ::] entity-listLOGICAL permits a KIND specification. Refer to the Fortran 95 Handbook for more syntaxdetails.attribute-listentity-listSyntax Extensionis the list of attributes for the character variable.is the list of defined entities.LOGICAL [*n] [,] name [*n] [dimensions] [/clist/][, name] [*n][dimensions] [/clist/]...nnameclistis an optional size specification.is the symbolic name of a variable, array, or an array declarator (see theDIMENSION statement for an explanation of array declarators).is a list of constants that initialize the data, as in a DATA statement.§108 Chapter 3

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

Saved successfully!

Ooh no, something went wrong!