Returns the lower bound of each dimension in an array, or the lower bound of a specified dimension.
Class
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.
The only exception is for a dimension that is zero-sized and ARRAY is not an assumed-size array of rank DIM, In such a case, the corresponding element in the result is one regardless of the value declared for the lower bound.
Examples
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.