LBound

From NSB App Studio
Revision as of 17:21, 8 July 2012 by Brendon (talk | contribs) (Created page with "LBOUND(''array''[, ''dimension'']) '''Description''' LBOUND returns a long value specifying the smallest available subscript in dimension of an array, ''array''. The require...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LBOUND(array[, dimension])

Description

LBOUND returns a long value specifying the smallest available subscript in dimension of an array, array. The required parameter, array, is any array variable. The optional parameter, dimension, specifies which dimension's lower bound is returned, beginning with the default, 1. The lower bound of any dimension of an array is always 0.

Example

REM LBOUND Example
'LBOUND returnslowerboundofarraydimension
DIM Other, Children(3), Parents(3, 1)
Other = ARRAY("Damien", "Pip", "Wendy")
PRINT "'Other' Lower Bound:", LBOUND(Other)
PRINT "'Children' Lower Bound:", _
  LBOUND(CHILDREN, 1)
PRINT "'Parents' Lower Bounds:", _
  LBOUND(Parents), LBOUND(Parents, 2)

Output

'Other' Lower Bound:0
'Children' Lower Bound:    0
'Parents' Lower Bounds:    0      0

Related Items

ARRAY, DIM, [[redim|REDIM}, UNBOUND