Path: utzoo!attcan!uunet!aplcen!samsung!rex!wuarchive!uwm.edu!uwvax!jackal.cs.wisc.edu!selitr From: selitr@jackal.cs.wisc.edu (Sean Selitrennikoff) Newsgroups: comp.lang.c Subject: = vs. == Message-ID: <11308@spool.cs.wisc.edu> Date: 19 Sep 90 16:33:54 GMT References: <28@screamer.csee.usf.edu> Sender: news@spool.cs.wisc.edu Organization: University of Wisconsin, Madison -- Computer Sciences Department Lines: 35 Look, it really is a matter of semantics. The problem arises in that most of the complainers out there started in PASCAL where if (a = b) is a test. Then we switched to C and it became a pain in the parse. In any case, if we had never learned PASCAL (or other language with '=' as a test) then we wouldn't be having this convo. Personally I think every C compiler ought to have a switch -DUM_DUM that checks for idiot errors and pops out a warning for them. That would solve all these errors that we make that are typo's. e.g. for (i=0;i<10;i++); printf("%d",i); I hate it when the loop does nothing. We're so used to putting ';' at the end of every line. I musta wasted days on things like this. In any case, it's all a part of the hacking experience. What would life be if you couldn't spend days looking for a bug only to have some dweeb peer over your shoulder and find it immediately? You oughta try teaching PASCAL 6 times a week and then trying to write a compiler in C. That'll make you smile/grunt/groan several times a week. Bottom Line: Let it be. That's the way it is, all we can do is build our own 'lint' that catches our idiot errors. - a minor opinion from someonw with a minor mind. sean