File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,18 +10,17 @@ LBound(<array variable>, <dimension>)
1010
1111##Description
1212
13- Returns the array lower bound of the given <dimension >. If the <dimension > is not specified, it defaults to 1 .
13+ Returns the array lower bound of the given <dimension >. If the <dimension > is not specified, it defaults to 0 .
1414If the specified <dimension > is 0, then total number of dimensions is returned.
1515
1616##Examples
1717
1818```
19- DIM a(3 TO 5, 2 TO 8)
20- PRINT LBound(a, 2) : REM Prints 2
21- PRINT Lbound(a) : REM Prints 3, because dimension defaults to 1
19+ DIM a(3 TO 5, 1 TO 8)
20+ PRINT LBound(a, 2) : REM Prints 1
21+ PRINT Lbound(a) : REM Prints 2, the number of dimensions
2222```
2323
24-
2524The result is always a 16bit integer value.
2625
2726If the <dimension > is 0, then the number of dimension in the array is returned
Original file line number Diff line number Diff line change @@ -9,15 +9,15 @@ UBound(<array variable>, <dimension>)
99
1010##Description
1111
12- Returns the array upper bound of the given <dimension >. If the <dimension > is not specified, it defaults to 1 .
12+ Returns the array upper bound of the given <dimension >. If the <dimension > is not specified, it defaults to 0 .
1313If the specified <dimension > is 0, then total number of dimensions is returned.
1414
1515##Examples
1616
1717```
1818DIM a(3 TO 5, 2 TO 8)
1919PRINT UBound(a, 2) : REM Prints 8
20- PRINT Ubound(a) : REM Prints 5 , because dimension defaults to 1
20+ PRINT Ubound(a) : REM Prints 2 , because it has 2 dimensions
2121```
2222
2323
You can’t perform that action at this time.
0 commit comments