integer value of multi-char constants
Conor P. Cahill
cpcahil at virtech.UUCP
Tue Oct 17 23:03:27 AEST 1989
In article <20205 at mimsy.umd.edu>, chris at mimsy.umd.edu (Chris Torek) writes:
> The machines listed above all form two-character constants by computing
> (more or less) c0*256+c1 (or c1*256+c0), where c0 and c1 are the first
> and second characters in the constant. Hence '\001\177' is 0x17f and
> '\000\177' is 0x07f. It would be very strange for these to be equal.
Maybe I am just being real dense, but how does this explain the authors question
that on the same machine
'\001\377' == '\000\377';
By your explanation this should be
0x1ff == 0x0ff
Which seems wrong to me.
--
+-----------------------------------------------------------------------+
| Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 !
| Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 |
+-----------------------------------------------------------------------+
More information about the Comp.std.c
mailing list