if you get the error
Error... File does not exist!
then the filename "exam data.txt" may not be a matching name, perhaps try renaming it
Or you havent placed the text file in your projects media folder and your program cant find it
And the above will work with text files or files that have been made in or saved in text format like you would use in Notepad
Binary files or other formats extensioned .txt wont neccesarily work
myArray as string[]
if GetFileExists( "exam data.txt" )
read = OpenToRead( "exam data.txt" )
while FileEOF( read ) = 0
string$ = ReadLine( read )
myArray.insert( string$ )
endwhile
closefile( read )
else
e$ = "Error... File does not exist!"
print (e$)
endif
myArray.length = newSize
i=0
while i<newSize and newSize>0
print(myArray[i])
inc i
sync()
endwhile
fubar