Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: Is this a bug in Turbo C 2.0? Message-ID: <1180@sdrc.UUCP> Date: 8 Mar 90 22:53:12 GMT References: <3210@pur-phy> Organization: SDRC, Cincinnati Lines: 15 In article <3210@pur-phy>, murphy@pur-phy (William J. Murphy) writes: > [ should long = short + short; be done with short or long > arithmetic? ] Either is acceptable. ANSI C requires the arithmetic to be done in short -- if the result overflows, the results are undefined, thus getting the right answer (by actually doing long arithmetic) is acceptable. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@SDRC.UU.NET 2000 Eastman Dr. BIX: ltl Milford, OH 45150-2789 AT&T: (513) 576-2070 "You know how Einstein got bad grades as a kid? Well MINE are even WORSE!" -Calvin