C/C++ and Fortran

 View Only

Implied-shape arrays

By Archive User posted Mon March 18, 2013 10:06 PM


Originally posted by: Yvonne Ma

XL Fortran supports implied-shape arrays. An implied-shape array is a named constant that inherits its shape from the constant expression in its declaration.

In the following example, array imp is an implied-shape array. Its declaration contains an implied-shape specification and a constant expression which is an array. Array imp is a rank-one array and its upper bound is 2.

INTEGER, PARAMETER :: imp(0:*) = [0, 1, 2]

For more information about this Fortran 2008 feature, visit Implied-shape arrays (Fortran 2008).

Authors: Yvonne Ma, Rafik Zurob