Add datas in a file

BlitzMax Forums/BlitzMax Programming/Add datas in a file

This does the trick:
' File creation, and datas addition. No problem here
WriteFile("c:\TestFile.txt")

file = OpenFile("c:\TestFile.txt")

WriteLine(file, "test1")
WriteLine(file, "test2")

CloseFile file



file = OpenFile("c:\TestFile.txt")

While Not Eof(file)
	Print ReadLine(file)
Wend

SeekStream file, StreamSize(file) ' <- line of miracles

WriteLine(file, "test3")

CloseFile file



file = OpenFile("c:\TestFile.txt")

While Not Eof(file)
	Print ReadLine(file)
Wend

CloseFile file