The LowBound function returns the smallest index occupied in the specified list. If the list does not contain any values, LowBound returns -1.
Syntax | ||||
LowBound(Var) | ||||
Return value | ||||
Type |
Description | |||
Long |
The smallest index of the list. | |||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Required |
Var |
List variable of any type |
ByRef |
Must be a list. |
Note
The smallest possible list index of lists in TCE is zero. Lists do not need to be dimensioned. For example, if you assign a value to an empty list, such as list index 3 and list index 5, the list has a low bound value of 3 and an upbound value of 5.
Example
Dim Names() As String
Dim MinIndex As Long
Names(1) := "Muller" # Index 0 wird nicht belegt
Names(3) := "Maier"
Names(7) := "Schmitt"
MinIndex := LowBound(Names)
Result: MinIndex = 1
See also UpBound