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.

2.7 Hollerith ConstantsThe form of a Hollerith constant is:nHc 1 c 2 ...c nwhere n specifies the positive number of characters in the constant and cannot exceed 2000characters. A Hollerith constant is stored as a byte string with four characters per 32-bit word.Hollerith constants are untyped arrays of INTEGER*4. The last word of the array is padded on theright with blanks if necessary. Hollerith constants cannot assume a character data type and cannotbe used where a character value is expected. The data type of a Hollerith constant used in anumeric expression is determined by the following rules:• Sign-extension is never performed.• The byte size of the Hollerith constant is determined by its context and is not strictly limitedto 32 or 64 bits like hexadecimal and octal constants.• When the constant is used with a binary operator (including the assignment operator), the datatype of the constant assumes the data type of the other operand.• When a specific data type is required, that type is assumed for the constant. When an integeror logical is required, INTEGER*4 and LOGICAL*4 are assumed. When a float is required,REAL*4 is assumed (array subscripting is an example of the use of a required data type).• When a constant is used as an argument to certain generic functions (AND, OR, EQV, NEQV,SHIFT, and COMPL), a 32-bit operation is performed if no argument is larger than 32 bits;otherwise, a 64-bit operation is performed. The size of the result corresponds to the chosenoperation.• When a constant is used as an actual argument, no data type is assumed and the argument ispassed as an INTEGER*4 array. Character constants are passed by descriptor only.• When a constant is used in any other context, a 32-bit INTEGER*4 array type is assumed.When the length of the Hollerith constant is less than the length implied by the data type, spacesare appended to the constant on the right. When the length of the constant is greater than the lengthimplied by the data type, the constant is truncated on the right.2.8 StructuresA structure, a DEC extension to FORTRAN 77, is a user-defined aggregate data type having thefollowing form:44 Chapter 2

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

Saved successfully!

Ooh no, something went wrong!