Reading Text files

BlitzMax Forums/BlitzMax Beginners Area/Reading Text files

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.

Adjusted slightly from the docs :
' readfile.bmx

' the following prints the contents of this source file 

file:TStream=ReadFile("test.bmx")

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

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

CloseStream file