Path: utzoo!utgpu!water!watmath!clyde!ima!necntc!frog!john From: john@frog.UUCP (John Woods, Software) Newsgroups: comp.lang.c Subject: Re: = vs ==, and do 10 i = 1.3 Keywords: C, lint, checking Message-ID: <2033@frog.UUCP> Date: 26 Jan 88 22:30:00 GMT References: <8971@ccicpg.UUCP> etc <887@micomvax.UUCP> Organization: Superfrog Heaven [ CRDS, Framingham MA ] Lines: 33 In article <887@micomvax.UUCP>, ray@micomvax.UUCP (Ray Dunn) writes: > In article <8971@ccicpg.UUCP> @ccicpg.UUCP (Nick Crossley) writes: > >The third warns about :- > > if (a); > > stat1; > >which is legal, but dubious > Ah yes, and then there is, for example: > fn1 ("paramstring 1", 57); > fn2 ("paramstring 2", 23); > for (i = 1; i < 100; i++); > fn3 (argument, i); > Which has TWICE taken me a similar time to find (You'd think I'd learn!) > Indentation is IGNORED by Lint and the compiler, but is superficially VERY > significant to we visually oriented beings. Thus the occasional problem > in spotting the above class of errors. As it happens, there was an article some years back in (I think) SIGPLAN (but I'm extremely unsure) about a PASCAL compiler that had been modified to REMOVE the begin and end keywords -- block structure was indicated by indentation, and ONLY by indentation! I suppose, though, that this trick would have less applicability in C, where macros can be used to hide the keywords and even to invent blocks in the middle of nowhere. -- John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101 ...!decvax!frog!john, ...!mit-eddie!jfw, jfw@eddie.mit.edu "Cutting the space budget really restores my faith in humanity. It eliminates dreams, goals, and ideals and lets us get straight to the business of hate, debauchery, and self-annihilation." -- Johnny Hart