C's syntax

Delaney, Timothy tdelaney at avaya.com
Wed Oct 25 20:22:52 EDT 2000


> No... In C, all weird things can happen and you *don't* know
> it was a typo... One of my coworkers used to make this mistake over
> and over again:
> 
>   for(i=0;i<MAX;i++);
>    {
>     ....
>    }
> 
> After helping him finding the superfluous ";" several times, i was
> close to writing a script for this purpose. Then he quit the company
> and i didn't have to write it.

Very true ... However, since it is a problem that he made "over and over" he
*should* have learned that it's a mistake that he personally makes very
commonly. Every decent programmer learns which mistakes are the ones s/he
makes most frequently and how to identify them. It's just that the =/==
mistake is one of the most common typos, and hence the one which gets talked
about most.

Tim Delaney
Avaya Australia




More information about the Python-list mailing list