On Sunday, October 27, 2019 6:44:05 AM MDT Per Nordlöw via Digitalmars-d-
learn wrote:
> In which circumstances can a `char` be initialized a non-7-bit
> value (>= 128)? Is it possible only in non-@safe code?
>
> And, if so, what will be the result of casting such a value to
> `dchar`? Will that
On Sunday, 27 October 2019 at 14:36:54 UTC, Ernesto Castellotti
wrote:
On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote:
[...]
char in D is always unsigned, it is not implementation-specific.
Therefore it can take values up to (2^8)−1, If you want a
signed 8 byte type you can
On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote:
In which circumstances can a `char` be initialized a non-7-bit
value (>= 128)? Is it possible only in non-@safe code?
And, if so, what will be the result of casting such a value to
`dchar`? Will that result in an exception or will
On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote:
In which circumstances can a `char` be initialized a non-7-bit
value (>= 128)? Is it possible only in non-@safe code?
All circumstances, `char`'s default initializer is 255.
char a; // is 255
And, if so, what will be the result
In which circumstances can a `char` be initialized a non-7-bit
value (>= 128)? Is it possible only in non-@safe code?
And, if so, what will be the result of casting such a value to
`dchar`? Will that result in an exception or will it interpret
the `char` using a 8-bit character encoding?