Funny mistake

Wolfram Roesler wolfram at cip-s05.informatik.rwth-aachen.de
Wed Feb 27 02:18:50 AEST 1991


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



More information about the Comp.lang.c mailing list