This one bit me today

Wm E Davidsen Jr davidsen at crdos1.crd.ge.COM
Sat Oct 14 03:38:50 AEST 1989


In article <9999 at cbnews.ATT.COM>, smk at cbnews.ATT.COM (Stephen M. Kennedy) writes:

|  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)".

  Oops! I meant pointers as in "helpful hints", not the "pointer to
TYPE" sense. This is a section on common errors, and a few not so
common but really hard to find. 

  When trying to tell students to use loads of parens in macros defs I
liked the example as a case of something which appears to work but
fails because the parens are missing. Based on feedback from students,
a "horrible example" of what can happen if done wrong helps make the
warning stick.

  My use of 'Pointers" was certainly not clear in context.
-- 
bill davidsen	(davidsen at crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon



More information about the Comp.lang.c mailing list