I'm having some difficulty using the endline character "~n" in my code.
It seems when I type out the character as a constant as in:
Txt = "This would be line one~nThis would be line two."
It works fine.
However, whenever I try to use a string that was loaded from a file containing the "~n" character, it prints the "~n" character literally to the screen instead.
Is this because the BlitzMax compiler somehow substitutes the ~n for endline characters when compiling?
I have tried using the following code to manually replace the "~n" with Chr(10), however the Replace() function doesn't seem to replace any of the characters at all...
Data = Replace(Data, "~n", Chr(10))
Info = Replace(Info, "~n", Chr(10))
Any help solving this mystery would be greatly appreciated.
It seems when I type out the character as a constant as in:
Txt = "This would be line one~nThis would be line two."
It works fine.
However, whenever I try to use a string that was loaded from a file containing the "~n" character, it prints the "~n" character literally to the screen instead.
Is this because the BlitzMax compiler somehow substitutes the ~n for endline characters when compiling?
I have tried using the following code to manually replace the "~n" with Chr(10), however the Replace() function doesn't seem to replace any of the characters at all...
Data = Replace(Data, "~n", Chr(10))
Info = Replace(Info, "~n", Chr(10))
Any help solving this mystery would be greatly appreciated.