LF Fortran 95

Named Data

A named data object, such as a variable, named constant, or function result, is given the properties of an intrinsic or user-defined data type, either implicitly (based on the first letter of the name) or through a type declaration statement. Additional information about a named data object, known as the data object's attributes, can also be specified, either in a type declaration statement or in separate statements specific to the attributes that apply.

Once a data object has a name, it can be accessed in its entirety by referring to that name. For some data objects, such as character strings, arrays, and derived types, portions of the data object can also be accessed directly. In addition, aliases for a data object or a portion of a data object, known as pointers, can be established and referred to.

In the absence of a type declaration statement, a named data object's type is determined by the first letter of its name. The letters I through N begin INTEGER data objects and the other letters begin REAL data objects. These implicit typing rules can be customized or disabled using the IMPLICIT statement. IMPLICIT NONE can be used to disable all implicit typing for a scoping unit.

A type declaration statement specifies the type, type parameters, and attributes of a named data object or function. A type declaration statement is available for each intrinsic type, INTEGER, REAL (and DOUBLE PRECISION), COMPLEX, LOGICAL, or CHARACTER, as well as for derived types (see Derived Types).


Besides type and type parameters, a data object or function can have one or more of the following attributes, which can be specified in a type declaration statement or in a separate statement particular to the attribute: