NAME

lbound - return lower bound for array subscripts

SYNOPSIS

v = lbound(ArrayName[, NumExpr])

DESCRIPTION

The lbound function returns the lower bound for subscripts along a dimension of an array.  ArrayName is the name of the array, without the subscripts and parentheses normally used in an array reference.  NumExpr is a numeric expression which gives the number of the dimension.  Dimensions are numbered in order of their appearance starting with one.  NumExpr is unnecessary and may be omitted for one dimensional arrays. 

SEE ALSO

option base, ubound

USAGE NOTES

Actually, the arguments to this function are immaterial because the only way the lower bound can be changed from zero is by the option base statement (see option base) and the lower bound can only be changed to one.  The value may not be changed thereafter so the lower bound of all dimensions of all arrays in a module is the same.  And while it is possible for two modules of the same program to define different lower bounds, this information is not coordinated between them so the modules can not effectively shared an array.  Thus lbound simply returns the value of the last option base statement or zero.  As is often the case, if this value is fixed early in the programís design, the lbound function is worthless. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber