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.

same manner. Direct access files are accessed by specifying a record number for input, and bywriting to the currently specified record on output.Files may contain one of two types of records, fixed length records or variable length records. Tospecify the size of the fixed length records in a file, use the RECL specifier with the OPENstatement. RECL sets the record length in bytes. 1 RECL can only be used when access is direct.A record in a variable length formatted file is terminated with \n. A record in a variable lengthunformatted file is preceded and followed by a word indicating the length of the record.5.1.1 Standard Preconnected UnitsCertain input and output units are predefined, depending on the value of compiler options. The<strong>PGI</strong> Fortran compilers –Mdefaultunit option tells the compiler to treat "*" as a synonym forstandard input for reading and standard output for writing. When the option is –Mnodefaultunit,the compiler treats "*" as a synonym for unit 5 on input and unit 6 on output.5.2 Opening and Closing FilesThe OPEN statement establishes a connection to a file. OPEN allows you to do any of thefollowing• Connect an existing file to a unit.• Create and connect a file to a unit.• Create a file that is preconnected.• Establish the access method and record format for a connection.OPEN has the form:OPEN (list)where list contains a unit specifier of the form:[UNIT=] uwhere u, an integer, is the external unit specifier.1 The units depend on the value of the FORTRANOPT environment variable. If the value is vaxio, thenthe record length is in units of 32-bit words. If FORTRANOPT is not defined, or its value is somethingother than vaxio, then the record length is always in units of bytes.152 Chapter 6

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

Saved successfully!

Ooh no, something went wrong!