type cast in initializer :-)

throopw at dg_rtp.UUCP throopw at dg_rtp.UUCP
Mon Feb 24 11:55:09 AEST 1986


>>> The values of '\377' and -1 are one and the same without a type cast.
>> Yes---*if* your machine has signed `char's.
> AND if your machine has eight-bit bytes...

AND two's complement arithmetic,
AND the phase of the moon is right,
AND the gods are properly propiciated,
AND the keyboard is anointed with the blood of three chickens,
AND you dance around your terminal widdershins,

    (Maybe it would be simpler to just say that '\377' is some
     implementation-defined value of type integer???
     Nyeah!  Couldn't be!)

AND the south pole of Uranus points towards the sun.
AND ...

And now we can start a long and fulfilling discussion about what '\377'
and -1 are *with* typecasts!  Wouldn't that be lovely?  Hmmmmm?
-- 
Wayne Throop at Data General, RTP, NC
<the-known-world>!mcnc!rti-sel!dg_rtp!throopw



More information about the Comp.lang.c mailing list