Strings and files

Blitz3D Forums/Blitz3D Beginners Area/Strings and files

Marcell(Posted 2004) [#1]
I noticed that when I write a string into a file, the length of the string is written in the 4 first bytes of the written file. I guess that also when reading string from a file, the format must be like that. Just to make sure I decided to ask that is it so. :)


soja(Posted 2004) [#2]
Yes, WriteString and ReadString are like that.

If you want plain text, you can use WriteLine and ReadLine, which are terminated by <CR><LF>, so can be any length.