Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!cbosgd!osu-cis!osupyr!gae From: gae@osupyr.UUCP (Gerald Edgar) Newsgroups: comp.sys.mac Subject: Re: Lightspeed C bug? Message-ID: <364@osupyr.UUCP> Date: 25 Dec 87 14:40:47 GMT References: <870081@hpcilzb.HP.COM> Reply-To: gae@osupyr.UUCP (Gerald Edgar) Organization: The Ohio State University, Dept. of Math. Lines: 15 In article <870081@hpcilzb.HP.COM> cnc@hpcilzb.HP.COM (Chris Christensen) writes: ..... >#define ABS(x) (((x) < 0) ? -(x) : (x)) >x = ABS(Random()) % 8; The preprocessor converts this to: x = (((Random()) < 0) ? -(Random()) : (Random())) % 8; So that Random() will be evaluated twice. -- Gerald A. Edgar TS1871@OHSTVMA.bitnet Department of Mathematics gae@osupyr.UUCP The Ohio State University ...{akgua,gatech,ihnp4,ulysses}!cbosgd!osupyr!gae Columbus, OH 43210 70715,1324 CompuServe