Hi
May be that OOo and basic are not the better tools for manipulate a
file.txt.
it works
i have no problem with the following coding
did not test the tools - loadfromfile helper
Laurent
sub createFile
open "/home/lgodard/bigfile.txt" for output as #1
for i = 1 to 130000
print #1, "line number " & cstr(i) & " " & string(100,"-")
next i
print "file created"
end sub
this ends with a around 15 Mb file with lines like
line number 1 --------
line number 2 --------
....
then reading it
(i removed redim preserve for performances)
sub readFile
redim myArray(130000)
counter = 0
open "/home/lgodard/bigfile.txt" for input as #1
while not eof(1)
line input #1, aLine
counter = counter + 1
myArray(counter) = aLine
wend
close #1
print "ok " & cstr(counter)
end sub
--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org -
http://www.indesko.com
Nuxeo Enterprise Content Management >> http://www.nuxeo.com -
http://www.nuxeo.org
Livre "Programmation OpenOffice.org", Eyrolles 2004-2006
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]