Data Object Declarations and Specifications
The Cray Fortran compiler accepts the following extensions to declarations.
The Cray Fortran compiler accepts the following extensions to declarations. The maximum rank is equal to 31. The standard requires a maximum rank of 15.
BOZ Constraints in DATA Statements
The Cray Fortran compiler permits a default real object to be initialized with a BOZ, typeless, or character (used as Hollerith) constant in a DATA statement. BOZ constants are formatted in binary, octal, or hexadecimal. No conversion of the BOZ value, typeless value, or character constant takes place.
The Cray Fortran compiler permits an integer object to be initialized with a BOZ, typeless, or character (used as Hollerith) constant in a type declaration statement. The Cray Fortran compiler also allows an integer object to be initialized with a typeless or character (used as Hollerith) constant in a DATA statement.
If the last item in the data_object_list is an array name, the value list can contain fewer values than the number of elements in the array. Any element that is not assigned a value is undefined.
| literal-constant | is | typeless-constant |
| typeless-constant | is | octal-typeless-constant |
| octal-typeless-constant | is | digit digit... B |
| or | " digit digit... "O | |
| or | ' digit digit... 'O | |
| hexadecimal-typeless-constant | is | X' hex-digit hex-digit... ' |
| or | X" hex-digit hex-digit... " | |
| or | ' hex-digit hex-digit... 'X | |
| or | " hex-digit hex-digit... "X |
type, AUTOMATIC , attribute-list :: entity-list| automatic-stmt | is | AUTOMATIC :: entity-list |
entity-list
For entity-list, specify a variable name or an array declarator. If an entity-list item is an array, it must be declared with an explicit-shape-spec with constant bounds. If an entity-list item is a pointer, it must be declared with a deferred-shape-spec.
If an entity-list item has the same name as the function in which it is declared, the entity-list item must be scalar and of type integer, real, logical, complex, or double precision.
If the entity-list item is a pointer, the AUTOMATIC attribute applies to the pointer itself and not to any target that may become associated with the pointer.
- DIMENSION
- TARGET
- POINTER
- VOLATILE
- Pointers or arrays used as function results
- Dummy arguments
- Statement functions
- Automatic array or character data objects
- It cannot be defined in the scoping unit of a module.
- It cannot be a common block item.
- It cannot be specified more than once within the same scoping unit.
- It cannot be initialized with a DATA statement or with a type declaration statement.
- It cannot also have the SAVE or STATIC attribute.
- It cannot be specified as a Cray pointee.
IMPLICIT Statement
- Implicit Extensions
- The Cray Fortran compiler accepts the IMPLICIT AUTOMATIC or IMPLICIT STATIC syntax. It is recommended that none of the IMPLICIT extensions be used in new code.
Storage Association of Data Objects
- EQUIVALENCE Statement Extensions
- The Cray Fortran compiler allows equivalencing of character data with noncharacter data. The Fortran standard does not address this. It is recommended that equivalencing is not performed in this manner, however, because alignment and padding differs across platforms, thus rendering the code less portable.
- Variables in blank common and variables in named common blocks can be initialized.
- Named common blocks and blank common are always saved.
- Named common blocks of the same name and blank common can be of different sizes in different scoping units.