02-04-2024, 12:45 PM
(02-04-2024, 12:28 PM)SMcNeill Wrote: DIM X(1) is an array with one element.Ok, It's clear. Thank's!
DIM X is a variable.
SUB foo(x, y() )
Now, in that SUB, what values can you pass to those parameters?
For x, you pass a single value, or a variable.
Your y(), you pass a whole array.
A variable is NOT the same as a single element array.
Variables can never be REDIMed to hold more elements. They have no indexes. The contain just a single value.
Even a single-element array has an index. X(0). This index tells you, "THIS IS NOT A VARIABLE." Don't fool yourself into thinking it is.