Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UBOUND
#2
(02-03-2024, 08:54 PM)bartok Wrote: As you can see, I'm in the mood for questions.

Look at this:
Code: (Select All)

OPTION _EXPLICIT
DIM myArray%(5)
PRINT UBOUND(myArray%)

the result is "5".

Fine.

Look at this:
Code: (Select All)

OPTION _EXPLICIT
DIM myArray%
PRINT UBOUND(myArray%)

This is less "fine".
1. If OPTION_EXPLICIT is activeted, it says "myArray" is not defined.... why?
2. If OPTION_EXPLICIT is deactiveted, the result is "10"... why?

DIM myArray% is only a varaible NOT an array it needs the () for an array Ubound can make sense of.
b = b + ...
Reply


Messages In This Thread
UBOUND - by bartok - 02-03-2024, 08:54 PM
RE: UBOUND - by bplus - 02-03-2024, 10:03 PM
RE: UBOUND - by SMcNeill - 02-03-2024, 10:28 PM
RE: UBOUND - by bartok - 02-04-2024, 08:34 AM
RE: UBOUND - by SMcNeill - 02-04-2024, 12:28 PM
RE: UBOUND - by bartok - 02-04-2024, 12:45 PM



Users browsing this thread: 1 Guest(s)