[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.2 Reference Manual
- From: Sean Conner <sean@...>
- Date: Mon, 5 Sep 2011 19:09:59 -0400
It was thus said that the Great Axel Kittenberger once stated:
> Trying to sum it up:
> the C- type signed or unsigned "char" is equivalent to a "byte".
> A "byte" is at least 8 bits, but does not have to be that. Albeit, de
> facto, one can 99%ly assume it is, so far that many started to believe
> a byte is always and exactly 8 bits.
> The term "octet" jumps in place to be defined to be exactly 8 bits,
> but it does not appear anywhere in the C standard(s).
> That the term "char" confuses to be char-acter is a little confusing
> history from times there weren't ever any multibyte characters.
> Lua uses ANSI C (signed) "char". therefore whatever it does, it does "bytes".
One more thing---by default, a bare "char" declaration can be either
signed or unsigned---it's implementation dependent. If you want a signed
char, you need to specify "signed char"; likewise, if you want an unsigned
char, you need to specify "unsigned char".
-spc (And a "nibble" is four bits 8-)