Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!hp-pcd!hp-dcd!donn From: donn@hp-dcd.UUCP (donn) Newsgroups: net.lang Subject: Re: Bad language constructs Message-ID: <24200007@hp-dcd.UUCP> Date: Tue, 10-Jul-84 14:29:00 EDT Article-I.D.: hp-dcd.24200007 Posted: Tue Jul 10 14:29:00 1984 Date-Received: Mon, 16-Jul-84 07:37:29 EDT References: <2877@ecsvax.UUCP> Organization: Hewlett-Packard - Fort Collins, CO Lines: 43 Nf-ID: #R:ecsvax:-287700:hp-dcd:24200007:000:1395 Nf-From: hp-dcd!donn Jul 13 10:29:00 1984 From what I remember of COBOL, there is a consequence of the ALTER statement in the langauge that may be worse than the ALTER itself. That's the semantics of PERFORM, the sort-of-subroutine call. It permits specifying the beginning and end of the subroutine: PERFORM a THRU b. Thus you can create the following mess (where the arrows indicate the range of two perform statements): A. ...... <---- B. | ...... | <---- C. | | ...... <---- | D. | ...... <---- E. ...... Since PERFORM A THRU B appears to be equivalent to ALTER B-END TO PROCEED TO HERE. GOTO A. HERE. ALTER B-END TO PROCEED TO C. (to fix it all up for next time.) it is possible to have BOTH the ranges above alive simultaneousy; it would be legal to have paragraph A contain a PERFORM B THRU D, as long as control flow did not drop thru the end of C during the inner perform. Some of the newer standards may limit this, but the standards and implementations of the late 60's and early 70's (I date myself) appeared to permit it. Did I do it? I simply couldn't bring myself to it, it was TOO horrible. Did I see stuff like that (or worse) used? Repeatedly; and they were proud of how clever they were! Donn Terry HP Ft. Collins Co.