Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cuae2!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.lang Subject: Re: More (ad nauseum) on removing punctuation in programming languages Message-ID: <1303@ttrdc.UUCP> Date: Fri, 7-Nov-86 01:07:30 EST Article-I.D.: ttrdc.1303 Posted: Fri Nov 7 01:07:30 1986 Date-Received: Sat, 8-Nov-86 04:11:36 EST References: <21836@rochester.ARPA> <2642@hammer.TEK.COM> <694@looking.UUCP> <7125@boring.mcvax.UUCP> <108@pembina.alberta.UUCP> Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 34 In article <108@pembina.alberta.UUCP>, cdshaw@alberta.UUCP writes: >In article <7125@boring.mcvax.UUCP> guido@boring.uucp (Guido van Rossum) writes: >>The difference between misplaced braces bugs and misplaced indentation >>bugs is that misplaced (often: missing) braces are hard to find. > >No they aren't. Use an editor which finds matching braces. They are >common and very reliable. >Chris Shaw cdshaw@alberta Ah, almost very reliable :-). Vi does this, but I had an awful time once with a fairly long C function (in someone else's code) which just would not compile on the machine I tried it on; kept getting strange error messages about bogus identifiers. Well, finally I idly put my cursor on the top curly brace of that function and hit '%'. Vi beeped at me! "HMMM, no match!" I said; "so that's why the code wouldn't compile!". Well, I went to the bottom of the code, put the cursor on the curly brace there, and hit '%' again. It matched with the second curly brace in from the top. I start moving in, matching pair against pair, for several iter- ations. Then '%' put me right in the middle of a printf statement: (void) printf("junkjunkjunk{trashtrashtrash\n"); ^ |-- see the "hidden" curly brace? Oh, well... *klunk* -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, go for it! allegra,ulysses,vax135}!ttrdc!levy