Intel® Fortran Compiler 17.0 Developer Guide and Reference

Initialization Expressions

An initialization expression is an expression that you can use as a kind type parameter, a named constant, or to specify an initial value for an entity. It is evaluated when a program is compiled.

In an initialization expression, each operation is intrinsic and each primary is one of the following:

If an initialization expression invokes an inquiry function for a type parameter or an array bound of an object, the type parameter or array bound must be specified in a prior specification statement (or to the left of the inquiry function in the same statement). The previous specification cannot be in the same entity declaration.

Examples

Valid Initialization Expressions

-1 + 3

SIZE(B)

! B is a named constant

7_2

INT(J, 4)

! J is a named constant

SELECTED_INT_KIND (2)

Invalid Initialization Expressions

SUM(A)

Not an allowed function.

A/4.1 - K**1.2

Exponential does not have integer power (A and K are named constants).

HUGE(4.0)

Argument is not an integer.

See Also