LBound: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Brendon (talk | contribs)
Line 29: Line 29:
== Related Items ==
== Related Items ==


[[array|ARRAY]], [[dim|DIM]], [[redim|REDIM]], [[unbound|UNBOUND]]
[[array|ARRAY]], [[dim|DIM]], [[redim|REDIM]], [[ubound|UBOUND]]


[[Category:Language Reference]]
[[Category:Language Reference]]

Revision as of 01:58, 17 August 2012

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 LBoun Example
'LBopund returns lower bound of array dimension
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, UBOUND