Trouble with eof...

BlitzMax Forums/BlitzMax Beginners Area/Trouble with eof...

I'd like to append to a file.
Currently, I have a loop that tests eof.
When eof hits, I'm trying to Writeline some more data.
It finds eof, prints a debug notification that it's writing
to the file, but the file remains the same. What's going
on here?

Small example:
Repeat
Print "searching in file..."
Local line:String = ReadLine(file)

' if line$ has what I want, I exit this loop
' if I never find the thing I want, I'll append it to the file:

If Eof(file) Then
Print "found eof, writing more..."
WriteLine file, "yada"
EndIf
Forever