FC>> I always assumed that numeric array elements were 0 unless
FC>> otherwise assigned.
FC>> dim huge record???(-32768 to 32767)
FC>> print record???(-32768)
FC>> is a long way from 0.
> I'm not certain what your point is, Frank.
Well, in the above example, record???(-32768) has a value of 4.294902E+9
until you assign another value to it. At least, it did just now. The value
may be random; I haven't experimented with it enough to be able to say. It's
non-zero, anyway.
If you do this:
dim record???(3)
print record???(0)
the value of record???(0) is 0 until you assign another value to it.
I was working with huge arrays and was doing something like this to run
through the array until I hit the end of the values that I had assigned:
x%=-32768
do until record???(x%) =0
incr x%
loop
and was wondering why it wasn't working. It took me a while to twig on to
the fact that the initial value of an unassigned numeric variable in a huge
array was non-zero, unlike other array structures.
--- Msgedsq 2.2e
---------------
* Origin: THE BIG ELECTRIC CAT Melville Sask *SDS* *PDN* (1:140/53)
|