Skip to content

Commit 9a2a7be

Browse files
authored
Merge pull request #365 from boriel/docs
Update ByRef example
2 parents 6596f17 + bf33f3a commit 9a2a7be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/byref.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ REM arrays passed to functions can be of *any dimensions*. Use LBOUND and UBOUND
3030
FUNCTION maxValue(ByRef a() as Ubyte) As UByte
3131
DIM i as UInteger
3232
DIM result As UByte = 0
33-
FOR i = 0 TO 4
33+
FOR i = LBOUND(a, 1) TO UBOUND(a, 1)
3434
IF a(i) > result THEN result = a(i)
3535
NEXT i
3636
RETURN result

0 commit comments

Comments
 (0)