Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.lang.c Subject: Re: Type-independent absolute value Keywords: abs, labs Message-ID: <3497@solo10.cs.vu.nl> Date: 4 Oct 89 23:52:42 GMT References: <1389@cipc1.Dayton.NCR.COM> <799@crdos1.crd.ge.COM> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 12 davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes: \In article <1389@cipc1.Dayton.NCR.COM>, \ gmaranca@cipc1.Dayton.NCR.COM (Gabriel Maranca) writes: \... \| #define ABS(x) (((long)(x) < 0L)? -(x) : (x)) \... \ 1. instead of -(x) use (-(x)). [...] Why? I can understand `-x' isn't a good idea, but `-(x)' seems OK to me. -- Did Andy Tanenbaum get his programming |Maarten Litmaath @ VU Amsterdam: instruction from a Cereal box? (Sam McCrea)|maart@cs.vu.nl, mcvax!botter!maart