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.

DescriptionThe record length, RECL=, must be specified if a file is connected for direct access and optionallyone of each of the other specifiers may be used. RECL is ignored if the access method issequential.The unit specified must exist and once connected by an OPEN statement can be referenced in anyprogram unit of the executable program. If a file is connected to a unit it cannot be connected to adifferent unit by the OPEN statement.If a unit is connected to an existing file, execution of an OPEN statement for that file is allowed.Where FILE= is not specified the file to be connected is the same as the file currently connected. Ifthe file specified for connection to the unit does not exist but is the same as a preconnected file, theproperties specified by the OPEN statement become part of the connection. However, if the filespecified is not the same as the preconnected file this has the same effect as the execution of aCLOSE statement without a STATUS= specifier immediately before the execution of the OPENstatement. When the file to be connected is the same as the file already connected only theBLANK= specifier may be different from the one currently defined.ExampleIn the following example a new file, BOOK, is created and connected to unit 12 for directformatted input/output with a record length of 98 characters. Numeric values will have blanksignored and E1 will be assigned some positive value if an error condition exists when the OPENstatement is executed; execution will then continue with the statement labeled 20. If no errorcondition pertains, E1 is assigned the value zero (0) and execution continues with the nextstatement.OPEN(12, IOSTAT=E1, ERR=20, FILE='BOOK',+ BLANK='NULL', ACCESS='DIRECT', RECL=98,+ FORM='FORMATTED',STATUS='NEW')Environment VariablesFor an OPEN statement which does not contain the FILE= specifier, an environment variable maybe used to specify the file to be connected to the unit. If the environment variable FORddd exists,where ddd is a 3 digit string whose value is the unit, the environment variable's value is the nameof the file to be opened.VAX/VMS Fortran Extensions §VAX/VMS introduces a number of extensions to the OPEN statement. Many of these relate onlyto the VMS file system and are not supported (e.g., KEYED access for indexed files). Thefollowing keywords for the OPEN statement have been added or augmented as shown below.Refer to Programming in VAX FORTRAN for additional details on these keywords.Fortran Statements 115

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

Saved successfully!

Ooh no, something went wrong!