CompuServe Messages

#Ansi Codes from 'C'

    03-Sep-90 21:00:05
Fm: Michael Haynie 72017,1030
To: John Draper 76703,4322
You are right, of course, given the assumption that hex constants are 8bits only. The problem is that ANSI compatable compilers have to be prepared to deal with 32bit (or is it word sized?) hex constants. (Note: in ANSI usage hex constant is a name for _character_ constant…) If the compiler implements this, they must be ready to read upto 8 hex characters for a character constant. What I believe the compiler in question did was to see the \x, begin to read a hex constant, read until a non hex digit appeared, then complain about not being able to fit 12bits into an 8bit bag. If this is the case, it is I think, a bug in the compiler, and an annoying one at that. As to a 7bit data type, I only know of 2 cases; signed and unsigned, both are 8 bits. Both are represented as 32bits in registers, and 8bit bytes in memory, the only difference being the interpretation of the high-order bit. b.t.w; Which compiler are we talking about? (I missed that part if it was mentioned). Mike Haynie (I could be wrong, but how can I tell?…)