Greg Ewing wrote:
>
> Blarg. Well, I think the wording of that part of the
> standard is braindamaged. The word "byte" already has
> a pre-existing meaning outside of C, and the C standard
> shouldn't be redefining it for its own purposes.
>
> This is like a financial document that defines "dollar"
> as "the unit of currency in use in the country concerned".
> Thoroughly confusing and unnecessary.
>
> Particularly since they seem to just be defining "byte"
> to mean the same thing as "char". Why not just use the
> term "char" in the first place?
>   
They are totally different concepts: byte is not a (C) type, but a unit, 
the one returned by the sizeof operator. One char occupies one byte of 
memory, and in memory, they are the same, but conceptually, they are 
totally different, from the C point of view at least. For example, C 
impose that sizeof(unsigned type) == sizeof(signed type) for any type, 
so if one byte is one char, unsigned char would be a byte too, and so 
unsigned char and char would be the same, which is obviously wrong.

cheers,

David

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to