Writing Files

Blitz3D Forums/Blitz3D Beginners Area/Writing Files

Mental Image(Posted 2004) [#1]
Hi, I am trying some very simple file writing, bt am having problems. The following code fragment works ok, but in the saved file, something appears before my text in the saved *.txt file (could be a carriage return and a TAB):

this$="Hello World!"
fileout=WriteFile("test.txt")
WriteString(fileout,this$)
CloseFile(fileout)

Any ideas why, and what I can do to get rid of it?

Thanks.


Rob Farley(Posted 2004) [#2]
Use a writeline instead of writesting if you want to create a regular text file.


Mental Image(Posted 2004) [#3]
Thanks, Rob.

Just the ticket....


eBusiness(Posted 2004) [#4]
It's 4 chars telling how long the string is. It's a form feed and 3 blanks. But use writeline as Rob says :)