[Gambas-user] How to replace chr$(13) from a text file

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue Apr 12 10:51:53 CEST 2016


The New Line in Linux is chr$(10), not chr$(13).

So here the Replace will not find anything:

Am 11.04.2016 17:18, schrieb José Monteiro:
> By now I tried to use:
>
> Mglobal.info = Replace$(TextArea1.Text, Chr$(13), "|")
>
> Unfortunately, the global variable "info" still has new lines and a parser
> refuses to accept it.

When you use Chr$(10) instead, it will run as expected. The "\n" in 
Linux means Chr$(10), just like gb.NewLine.

If you had a Windows text file, it would be Chr$(10) Chr$(13) instead 
and you would have to delete both. But in a pure Windows environment, a 
"\n" would mean this automatically.

Regards
Rolf





More information about the User mailing list