Writing Files

Blitz3D Forums/Blitz3D Beginners Area/Writing Files

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.

Use a writeline instead of writesting if you want to create a regular text file.

Thanks, Rob.

Just the ticket....

It's 4 chars telling how long the string is. It's a form feed and 3 blanks. But use writeline as Rob says :)