[Gambas-user] Dynamically changed arrays
Eilert
eilert-sprachen at ...221...
Tue Mar 16 17:25:04 CET 2004
Hi,
Somewhere in the documentation I found the "Java-style" arrays. Is that
a means of replacing my favourite "redim preserve"? I'll give you an
example (uncomplete code):
dim ls$()
'open a file with handle fptr
do while not eof(fptr)
line input #fptr, t$
ctr = ctr + 1
redim preserve ls$(ctr)
ls$(ctr)=t$
loop
close #fptr
Or something similar, I use this redim preserve always when I don't know
how much data (mostly data lines or something like that) I will have to
keep.
From the hints in the docu I cannot possibly figure out how to use
those Java-like arrays but it seems to be a way to use them for. Can
someone help me?
Regards
Rolf
More information about the User
mailing list