12-11-2005, 04:00 PM
Hi everyone,
I have a question, Is it possible to load a text file as large as 3 MB, around 70 thousand lines and then assign each lines to array variable in less than a minute or in a matter of seconds? It took me about 5 minutes to load and assign everything to array variable. I thought maybe there's a way to load the file directly to memory then it might be faster to fill in the data to array variable?
this is the code that I used:
str data
data.getfile("$desktop$\data.txt")
data.trim
int nrlines=numlines(data)
ARRAY(str) lines.create(nrlines)
for i 0 nrlines
lines[i].getl(data i)
I have a question, Is it possible to load a text file as large as 3 MB, around 70 thousand lines and then assign each lines to array variable in less than a minute or in a matter of seconds? It took me about 5 minutes to load and assign everything to array variable. I thought maybe there's a way to load the file directly to memory then it might be faster to fill in the data to array variable?
this is the code that I used:
str data
data.getfile("$desktop$\data.txt")
data.trim
int nrlines=numlines(data)
ARRAY(str) lines.create(nrlines)
for i 0 nrlines
lines[i].getl(data i)