Escape codes are not 100% portable

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 2 06:16:23 PDT 2015


"Jens Bauer"  wrote in message news:otojrdbbmfcfkuyolyse at forum.dlang.org...

> MrCpp, MrC, MPWC, MPWCpp and CodeWarrior.

Interesting.

> These compilers must respect the platform's definition of \n = newline and 
> \r = carriage return.
> Because the platform defines newline = 13, then \n must have the value 13.

That's horrible.  Are you completely sure this is what's happening?  Is this 
documented?  This sort of conversion is to be expected during cruntime io, 
but changing the values is nasty.

> Since there's not clear definition of \n and \r, they can't be trusted.
> As the hex values will not change, I would think that this is a safer bet.

There is very little reason to change the compiler at this point.  Those 
compilers are not officially supported as host compilers for building dmd. 



More information about the Digitalmars-d mailing list