File Strings on one line as opposed to multiple?
Blitz3D Forums/Blitz3D Beginners Area/File Strings on one line as opposed to multiple?| 
 | ||
| Hi all. How would I make the writeline format my text all on to one line as opposed to multiple lines? Thank you! :) | 
| 
 | ||
| WriteString is, possibly, what you want. Put all of you text into a string and then use writestring to commit the data. It is worthwile knowing that the data may not be written until the file is closed. | 
| 
 | ||
| i need it to be pure text though | 
| 
 | ||
| Then use writebytes | 
| 
 | ||
| I'm not sure why you would want it all pure text, since then there woudl; be no way to separate the individual strings (unless you knew in advance exactly how long wach would be) For that reason, I would seriously recommend using the short-int length signifier of WriteString or a terminator of sorts. However, for pure Ascii text ONLY, here: Function WriteStringBytes(h_File%,s_String$) If (s_string="") Then Return Local n_IterChar For nIterChar=1 To Len(s_String) WriteByte h_file,Asc(Mid(s_string,nIterchar,1)) And 255 Next End Function | 
| 
 | ||
| You can use writeline, just pass it a single string...concatenate them into one string then write it. |