VBScript LBound Function
Definition and Usage
The LBound function can return the minimum index that indicates the dimension of the array.
Note:The LBound of any dimension is always 0.
Tip:The LBound function is used together with the UBound function to determine the size of an array. The UBound function can be used to find the upper bound of a dimension of an array.
Syntax
LBound(arrayname[,dimension])
Parameters | Description |
---|---|
arrayname | Required. The name of the array variable. |
dimension | Optional. To return the lower bound of which dimension. 1 = First dimension, 2 = Second dimension, and so on. The default is 1. |
Instance
Example 1
dim a(10) a(0)="Saturday" a(1)="Sunday" a(2)="Monday" a(3)="Tuesday" a(4)="Wednesday" a(5)="Thursday" document.write(UBound(a)) document.write("<br />") document.write(LBound(a))
Output:
10 0