To Walter, about char[] initialization by FF
Derek Parnell
derek at nomail.afraid.org
Tue Aug 1 23:33:12 PDT 2006
On Tue, 01 Aug 2006 22:40:56 -0700, Unknown W. Brackets wrote:
> I'm trying to understand why this 0 thing is such an issue. If your
> second statement is valid, it makes the first moot - 0 or no 0. Why
> does it matter, then?
I think the issue is more that Andrew wants to have hex-FF as a legitimate
byte value anywhere in a char[] variable. He misses the point that the
purpose of not allowing it in so we can detected uninitialized UTF-8
strings at run-time.
Andrew, just use ubyte[] variables and you won't have a problem, apart from
conversions between code-pages and Unicode <G>.
In D, ubyte[] is the data structure designed to hold variable length arrays
of unsigned bytes, which is exactly what you need to implement the type
strings you have in KOI-8 encoding.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
2/08/2006 4:24:27 PM
More information about the Digitalmars-d
mailing list