TIP: Click on subject to list as thread! ANSI
echo: osdebate
to: Rich
from: John Beckett
date: 2006-02-07 21:04:12
subject: Re: History of BASIC and c

From: John Beckett 

"Rich"  wrote in message news::
>    C and C++ have the same rules.  If you had an int constant anded with a
>  long value the int constant would be sign extended before the and like it is
here.

True, but luck means this is one example where C and C++ would do what you
hoped because of the extra rule that a hex constant is considered unsigned
if the constant is too big for signed, and so the constant would NOT be
sign extended.

John

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270
@PATH: 379/45 1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.