🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #769

Re: integer value of multi-char constants

#769
From: Conor P. Cahill
Date: Tue, 17 Oct 1989 13:03
21 lines
1315 bytes
In article <20205@mimsy.umd.edu>, chris@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     |
+-----------------------------------------------------------------------+
Technical Details
Message-ID: <1286@virtech.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!virtech!cpcahil
References: <29588@gumby.mips.COM> <20205@mimsy.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!virtech!cpcahil
From: cpcahil@virtech.UUCP (Conor P. Cahill)
Newsgroups: comp.std.c
Subject: Re: integer value of multi-char constants
Message-ID: <1286@virtech.UUCP>
Date: 17 Oct 89 13:03:27 GMT
References: <29588@gumby.mips.COM> <20205@mimsy.umd.edu>
Organization: Virtual Technologies Inc
Lines: 21