Funny mistake

Kevin D. Quitt kdq at demott.com
Wed Feb 27 08:20:53 AEST 1991


In article <wolfram.667581530 at cip-s05> wolfram at cip-s05.informatik.rwth-aachen.de (Wolfram Roesler) writes:
>Hello out there,
>I had a funny mistake the other day you might be interested in. It was an
>obvious syntax error which resulted in legal C code. Funny too how many times
>I read over it without seeing whats wrong.
>
>What I wanted to write was:
>
>	if (fct(a,b,c))
>
>but by mistake I wrote:
>
>	if (fct(a,b),c)
>
>Easy to see here, but hard to discover when it's not a b c but some speaking
>variable names like NoOfLines or ErrorFlag or FilePtr or something.
>
>Perhaps that's why many people refuse to use speaking variable names... :)


    This is why god invented prototypes.


-- 
 _
Kevin D. Quitt         demott!kdq   kdq at demott.com
DeMott Electronics Co. 14707 Keswick St.   Van Nuys, CA 91405-1266
VOICE (818) 988-4975   FAX (818) 997-1190  MODEM (818) 997-4496 PEP last



More information about the Comp.lang.c mailing list