Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!gem.mps.ohio-state.edu!usc!rutgers!att!cbnews!smk From: smk@cbnews.ATT.COM (Stephen M. Kennedy) Newsgroups: comp.lang.c Subject: Re: This one bit me today Message-ID: <9999@cbnews.ATT.COM> Date: 6 Oct 89 13:23:22 GMT References: <832@crdos1.crd.ge.COM> Reply-To: smk@cbnews.ATT.COM (Stephen M. Kennedy,59443,cb,1K232,6148607133) Organization: AT&T Bell Laboratories Lines: 15 In article <832@crdos1.crd.ge.COM> davidsen@crdos1.UUCP (bill davidsen) writes: > This is a good example, and I thank you. I have added something >similar to my list of things to think about in the pointers section of >my C course notes. > It pops up in macros from time to time. Consider: > #define xavg(m) (sum+3)/m Why did you put this in the pointers section? This is just a poorly parenthesized macro. Consider "y = 1 / xavag(10);" or "xavg(n * 10)". p.s. In another article, did someone say it was ok to define an abs macro as -(x)? What about "y = -abs(x);"? --- Steve Kennedy att!cbosgd!smk "I love you, Kate"