XL Fortran for AIX 8.1

Language Reference

Data Types

A data type has a name, a set of valid values, a means to denote such values (constants), and a set of operations to manipulate the values. There are two categories of data types: intrinsic types and derived types.

The intrinsic types, including their operations, are predefined and are always accessible. There are two classes of intrinsic data types:

Derived types are user-defined data types whose components are intrinsic and/or derived data types.

Type Parameters and Specifiers

XL Fortran provides one or more representation methods for each of the intrinsic data types. Each method can be specified by a value called a kind type parameter, which indicates the decimal exponent range for the integer type, the decimal precision and exponent range for the real and complex types, and the representation methods for the character and logical types. Each intrinsic type supports a specific set of kind type parameters. kind_param is either a digit_string or scalar_int_constant_name.

The length type parameter specifies the number of characters for entities of type character.

A type specifier specifies the type of all entities declared in a type declaration statement. Some type specifiers (INTEGER, REAL, COMPLEX, LOGICAL, and CHARACTER) can include a kind_selector, which specifies the kind type parameter.

+-------------------------------IBM Extension--------------------------------+

For example, a 4-byte integer can be declared as INTEGER(4), INTEGER(KIND=4), INTEGER*4, or, if the default integer size is set to 4 bytes, simply INTEGER. In this book, references to 4-byte integers take the INTEGER(4) form. See type_spec for details on using type specifiers.

+----------------------------End of IBM Extension----------------------------+

The KIND intrinsic function returns the kind type parameter of its argument. See KIND(X) for details.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]