🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #560

Re: subtraction between unsigned ints

#560
From: Walter Murray
Date: Sat, 09 Sep 1989 00:37
16 lines
980 bytes
Norman Diamond writes:

>>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?

>It always has been unsigned, even in K&R days.  pANS says that the
>result must wrap around modulo some power of 2; this was not required
>by K&R but surely always occured.

I think it was required by K&R.  See Appendix A, section 6.5, in the
first edition (page 184).

Walter Murray
--
Technical Details
Message-ID: <12570024@hpclwjm.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
References: <KURO.89Sep5111940@shochu.Sun.Com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
From: walter@hpclwjm.HP.COM (Walter Murray)
Newsgroups: comp.std.c
Subject: Re: subtraction between unsigned ints
Message-ID: <12570024@hpclwjm.HP.COM>
Date: 9 Sep 89 00:37:49 GMT
References: <KURO.89Sep5111940@shochu.Sun.Com>
Organization: Hewlett-Packard Calif. Language Lab
Lines: 16