[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Plea for the support of unicode escape sequences
- From: David Given <dg@...>
- Date: Wed, 29 Jun 2011 06:49:59 +0100
Xavier Wang wrote:
> As ISO C Standard specified, the size of char is always 1.
Just to expand (I got very confused by this when working on Clue): the
standard decrees that sizeof() units are all relative to the size of a
char. This means that on some esoteric platforms where chars are bigger
than 8 bits, sizeof(char) will *still* be 1. To figure out how big it
actually is you need CHAR_BIT in <limits.h>.
Plus, sizeof(char) has nothing to do with the machine's address
granularity (which may not be bytes; PICs use 14-bit words each
individually addressable to store their program, for example).
┌─── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
Description: OpenPGP digital signature