WriteString/ReadString

BlitzMax Forums/BlitzMax Beginners Area/WriteString/ReadString

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.

Strict

Local file:TStream

file = WriteFile("file.txt")
  WriteString(file,"Hello")
CloseFile file

file = ReadFile("file.txt")
  Print ReadString(file,5)
CloseFile file

Personally I find it more convenient to use ReadLine/WriteLine.