Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!bbn!bbn.com!keesan From: keesan@bbn.com (Morris M. Keesan) Newsgroups: comp.lang.c Subject: Re: This one bit me today Message-ID: <46921@bbn.COM> Date: 13 Oct 89 21:24:30 GMT References: <832@crdos1.crd.ge.COM> <9999@cbnews.ATT.COM> Sender: news@bbn.COM Lines: 12 In article <9999@cbnews.ATT.COM> smk@cbnews.ATT.COM (Stephen M. Kennedy writes > p.s. In another article, did someone say it was ok to define an abs macro as > -(x)? What about "y = -abs(x);"? But -(x) is not the entire body of the macro. The macro was #define ABS(x) ((x) < 0 ? -(x) : (x)) and in this context, -(x) is fine and doesn't need to be (-(x)), because the whole macro has an outer set of parentheses. ------------------------------------------------------------------------------ Morris M. Keesan | Internet: keesan@bbn.com | UUCP: Figure it out from the path |