XL Fortran for AIX 8.1

Language Reference


Returns the lower bound of each dimension in an array, or the lower bound of a specified dimension.

is the array whose lower bounds you want to determine. Its bounds must be defined; that is, it must not be a disassociated pointer or an allocatable array that is not allocated.

DIM (optional)
is an integer scalar in the range 1 <= DIM <=  rank(ARRAY). The corresponding actual argument must not be an optional dummy argument.


Inquiry function

Result Type and Attributes

Default integer.

If DIM is present, the result is a scalar. If DIM is not present, the result is a one-dimensional array with one element for each dimension in ARRAY.

Result Value

Each element in the result corresponds to a dimension of array.


        REAL A(1:10, -4:5, 4:-5)
        RES=LBOUND( A )
! The result is (/ 1, -4, 1 /).
        RES=LBOUND( A(:,:,:) )
        RES=LBOUND( A(4:10,-4:1,:) )
! The result in both cases is (/ 1, 1, 1 /)
! because the arguments are array sections.

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