LBOUND Function

Purpose

Returns a fixed binary integer value giving the lower bound of the specified dimension of an array.

Syntax

LBOUND(x[,n])

Parameters

x is an array variable, and n is an integer constant indicating the dimension of x.

Description

The LBOUND function returns an integer value that gives the lower bound of the nth dimension of x. This is useful for arrays with * extents.

n is the specified dimension of the array. If n is not present, 1 is assumed. When present, n must be greater than zero and less than or equal to the number of dimensions declared.

Examples

DECLARE R FIXED BINARY; 
DECLARE A(3:5,2,-10:10,4:7);
   .
   .
   .
R = LBOUND(A,1);     /*R = 3*/
   .
   .
   .
R = LBOUND(A,2);    /*R = 1*/
   .
   .
   .

Restrictions

The LBOUND function is not supported with expression arguments.