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.

line option). Dummy arguments, names of procedures and names of entities within a commonblock may not be specified in a SAVE statement. Use of the SAVE statement with local variablesensures the values of the local variables are retained for the next invocation of the SUBROUTINEor FUNCTION. Within a main program the SAVE statement is optional and has no effect.When a RETURN or END is executed within a subroutine or function, all entities becomeundefined with the exception of:• Entities specified by a SAVE statement• Entities in blank common or named common• Entities initially defined which have not been changed in any wayExamplePROGRAM SAFE.CALL KEEP.SUBROUTINE KEEPCOMMON /LIST/ TOP, MIDDLEINTEGER LOCAL1.SAVE /LIST/, LOCAL1SELECT CASE 90The SELECT CASE statement begins a CASE construct.Syntax[case-name:]SELECT CASE (case-expr)[ CASE selector [name]block] ...[ CASE DEFAULT [case-name]blockEND SELECT [case-name]ExampleSELECT CASE (FLAG)CASE ( 1, 2, 3 )TYPE=1CASE ( 4:6 )TYPE=2132 Chapter 3

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

Saved successfully!

Ooh no, something went wrong!