10.07.2015 Views

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

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.

<strong>Fortran</strong> Data Types‣ Fields within structures conform to machine-dependent alignment requirements, that is,fields in a structure are aligned as required by hardware.‣ A structure's storage requirements are machine-dependent.‣ Alignment of fields provides a C-like "struct" building capability and allows convenientinter-language communications.‣ Because explicit padding of records is not necessary, the compiler recognizes the %FILLintrinsic, but performs no action in response to it.‣ Data initialization can occur for the individual fields.2.10.1. RecordsA record, a DEC extension to FORTRAN 77, is a user-defined aggregate data item having thefollowing form:RECORD /structure_name/record_namelist[,/structure_name/record_namelist]...[,/structure_name/record_namelist]where:structure_nameis the name of a previously declared structure.record_namelistis a list of one or more variable or array names separated by commas.You create memory storage for a record by specifying a structure name in the RECORDstatement. You define the field values in a record either by defining them in the structuredeclaration or by assigning them with executable code.You can access individual fields in a record by combining the parent record name, a period (.),and the field name (for example, recordname.fieldname). For records, a scalar reference means areference to a name that resolves to a single typed data item (for example, INTEGER), while anaggregate reference means a reference that resolves to a structured data item.Scalar field references may appear wherever normal variable or array elements may appear withthe exception of COMMON, SAVE, NAMELIST, DATA and EQUIVALENCE statements.Aggregate references may only appear in aggregate assignment statements, unformatted I/Ostatements, and as parameters to subprograms.<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 31

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

Saved successfully!

Ooh no, something went wrong!