Skip to content

Commit 7e0a0b0

Browse files
committed
Update LBOUND and UBOUND documentation
1 parent 19aea90 commit 7e0a0b0

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

docs/lbound.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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.
1414
If 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-
2524
The result is always a 16bit integer value.
2625

2726
If the <dimension> is 0, then the number of dimension in the array is returned

docs/ubound.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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.
1313
If the specified <dimension> is 0, then total number of dimensions is returned.
1414

1515
##Examples
1616

1717
```
1818
DIM a(3 TO 5, 2 TO 8)
1919
PRINT 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

0 commit comments

Comments
 (0)