VBScript LBound
Function
The LBound function returns the smallest subscript of the specified array dimension.
Note: The LBound for any dimension is always 0.
Tip: Use the LBound function with the UBound function to determine the size of an array.
Syntax
Parameter | Description |
---|---|
arrayname | Required. The name of the array variable. |
dimension | Optional. The dimension for which the lower bound is to be returned. 1 = first dimension, 2 = second dimension, and so on. The default is 1. |
Example
Example 1
Output of the above example:
Example 2
A two-dimensional array:
Output of the above example: