From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_40,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public From: kaz@helios.crest.nt.com (Kaz Kylheku) Subject: Re: Porting Experiences (was Ada and Pascal etc ) Date: 1997/11/05 Message-ID: <63r12c$qm2$1@helios.crest.nt.com>#1/1 X-Deja-AN: 287276571 References: <345E3ACD.A15@gsg.eds.com> <345F9728.D61@gsg.eds.com> <63p2g1$vnt$1@helios.crest.nt.com> <3460CF02.3C99@ccgate.hac.com> Organization: A poorly-installed InterNetNews site Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1997-11-05T00:00:00+00:00 List-Id: In article <3460CF02.3C99@ccgate.hac.com>, Chris Brand wrote: >So, Lawrance Kirby claims that -2147483647 to 2147483647 will fit in a >long, while you claim that you can only rely on -2^31+1 to 2^31-1. > >Do I get a lollipop, or are you wrong ? The ^ symbol means exponent rather than exclusive or, and is intended to have a higher precedence than the unary minus or the addition operator, so that -2^8 means -(2^8) or -256. Thus -2^31+1 = -2147483647 and 2^31-1 = 2147483647 Lawrence and I are claiming the exact same thing stated in different terms. I'm sometimes too lazy to write the decimal constants. No lollipop. -- "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton