To Walter, about char[] initialization by FF
Walter Bright
newshound at digitalmars.com
Sat Jul 29 17:37:56 PDT 2006
Andrew Fedoniouk wrote:
> I will ask again:
>
> What:
> char c = 'a';
> means for you?
> And following in C/C++:
>
> #pragma(encoding,"KOI-8R")
>
> char c = '?';
>
> ?
Pragmas are implementation defined behavior in C and C++, meaning they
are unportable and rather useless. Not only that, char's themselves are
implementation defined, and so it is very difficult to write portable
code that deals with anything other than a-zA-Z0-9 and a few other
characters.
In D, char[] is a UTF-8 sequence. It's well defined, and therefore
portable. It supports every human language.
More information about the Digitalmars-d
mailing list