Can you put a text file into an array?

BlitzMax Forums/BlitzMax Beginners Area/Can you put a text file into an array?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is it possible to load a text file into an array?
file=ReadFile("readfile.bmx")

If Not file RuntimeError "could not open file openfile.bmx"

Global n=0 count=0 stringarray$[]

While Not Eof(file)
count:+1
     stringarray[n] = ReadLine(file)
n:+1
Wend

CloseStream file

For n = 0 To count
	Print stringarray[n]
Next 

My feeble attempt at modifying the "readfile" sample did not work.