Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!caip!brl-adm!brl-smoke!smoke!rbj@icst-cmr From: rbj@icst-cmr (Root Boy Jim) Newsgroups: net.lang.c Subject: Re: Re: WITH statement Message-ID: <2515@brl-smoke.ARPA> Date: Wed, 23-Jul-86 15:59:48 EDT Article-I.D.: brl-smok.2515 Posted: Wed Jul 23 15:59:48 1986 Date-Received: Thu, 24-Jul-86 03:46:41 EDT Sender: news@brl-smoke.ARPA Lines: 30 Ideally. Though I had a job one time translation large chunks of Pascal code to C. This was on a large CAD project, in other words, a big, non trivial, etc. example of Pascal. There were sections of the Pascal code with 5-10 levels of nested WITH statements. You get identifiers flying around all over the place, with no concept as to which structures they belong to (at least, not without referring to about six pages of RECORD declarations to track them down). Its may be very nice to have the WITH construct available when writing code, but its main purpose when maintaining or translating code is to create confusion and obstruct the real purpose of the code you're examining. It could lead to more efficient code when used properly, though I wonder if anyone thinks of the troubles involved when using it on a large sca be believed! While I'm no lover of Pascal, I CAN offer a porting solution. But first you must answer one question: Would you be happier (I didn't say `happy', I said `happi-ER') porting the code without the WITH's? You would? Good! Here's how. First you need the original Pascal compiler. Then you change all the `WITH p^'s to `WITH xp^'s, that is bogusize the WITH, but preserve the original name. Then fix all the errors by prepending `p^' where necessary, and remove the with statement. Yow! Now you are ready for all the other headaches. (Root Boy) Jim Cottrell This ASEXUAL PIG really BOILS my BLOOD...He's so..so.....URGENT!!