Randomly-Signed Character Variables - (nf)

jejones at ea.UUCP jejones at ea.UUCP
Tue Sep 11 04:36:00 AEST 1984


#R:sdcsvax:-3000:ea:5700015:000:459
ea!jejones    Sep 10 13:36:00 1984

Sigh. "Characters" are glyphs, which are stored in some (machine-dependent)
form internally. What C actually provides is a byte type. Programmers tend
to use it as short short int, since on some machines it is treated as an
eight-bit two's-complement number, and since one can't have arrays of
bit fields.

I would think that the standard should say that the behavior of "char" to
int coercion is undefined, other than being a 1-1 mapping.

						James Jones



More information about the Comp.lang.c mailing list