Article View: comp.std.c
Article #522subtraction between unsigned ints
From: Teruhiko Kurosaka - Sun Intercon
Date: Tue, 05 Sep 1989 18:19
Date: Tue, 05 Sep 1989 18:19
20 lines
1196 bytes
1196 bytes
Does pANSI defines the datatype of the result of subtraction
between unsigned integers? Would it be also unsigned? Then
what would be the result of subtraction of a number from a
smaller number? I am talking about this situation like:
unsigned int u, v;
long int x;
u=3; v=5;
x=u-v;
Is x guranteed to be -2?
-------
T. Kurosaka ("Kuro") --- Sun Microsystems, Intercontinental Operation
Internet: kuro@Corp.Sun.Com Voice:+1(415)496 6121 Fax: +1(415)858 0284
US Mail: Mail Stop A6-18, 1870 Embarcadero Rd., Palo Alto, CA 94303, USA
--
-------
T. Kurosaka ("Kuro") --- Sun Microsystems, Intercontinental Operation
Internet: kuro@Corp.Sun.Com Voice:+1(415)496 6121 Fax: +1(415)858 0284
US Mail: Mail Stop A6-18, 1870 Embarcadero Rd., Palo Alto, CA 94303, USA
Technical Details
Message-ID:
<KURO.89Sep5111940@shochu.Sun.Com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!newstop!sun!kuroShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!newstop!sun!kuro From: kuro@shochu.Sun.Com (Teruhiko Kurosaka - Sun Intercon) Newsgroups: comp.std.c Subject: subtraction between unsigned ints Message-ID: <KURO.89Sep5111940@shochu.Sun.Com> Date: 5 Sep 89 18:19:40 GMT Sender: news@sun.Eng.Sun.COM Distribution: comp Organization: Sun Microsystems Inc, Mt.View, CA, USA Lines: 20