TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: LAWRENCE GORDON
from: FRANK COX
date: 1996-11-29 09:21:00
subject: Huge arrays (Second try)

My mail hub advises me that he lost some mail, but isn't sure exactly what he 
lost.  Therefore, I'll send this message again.  If it's the second time 
around, please ignore it.
 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.