I have been playing with writestring and writeline commands to achieve a readable .txt file which is comprised of strings ending with carriage return/line feed when I need.
Point 1) writeline has a CR as a default, writes text which is readable but does not allow strings to be concatenated once written. Some will suggest join the string 1st and then write but that is not easily feasible on this occasion.
Point 2) using writestring allows strings to be concatenated,is normally unreadable, but by adding a carriage return and a linefeed anywhere in the written text makes it readable, e.g Writestring(1, animal$+Chr(13)+Chr(10)), however it creates a whitespace at the beginning of the next line which I am unable to remove e.g using TrimString since it is not part of the string.
Point 3) if I do the same using writestring2 then 3 whitespaces are inserted at the beginning of that written line.
I think these may be minor bugs but has anyone else been affected?
Attached a basic test.
animal$ = "elephant"
OpenToWrite(1,"test$.txt",0)
Writestring2(1, animal$+Chr(13) +Chr(10))
Writestring(1, animal$+Chr(13)+Chr(10))
Writeline(1, animal$)
Writestring(1, animal$)
CloseFile(5)
end