Rich kids are into COBOL

Shawn Gordon shawn-gordon at cox.net
Wed Feb 18 19:17:18 CST 2015


I love this loop construct. I was just talking to a friend the other day 
about how nice the GO language is, but I lamented that no one has ever 
copied the elegance of the single loop verb in COBOL.

On 2/18/2015 8:50 AM, Chuck Guzis wrote:
> Is there any other language (save PL/I for obvious reasons) that has 
> an equivalent to the COBOL PERFORM...THRU statement?
>
> That one always struck me as being a bit offbeat.  Example: Consider a 
> section of a program with 4 consecutive paragraphs, named PARA-1 
> through PARA-4.  One can say in the same program:
>
> PERFORM PARA-1 23 TIMES.
> PERFORM PARA-1 THRU PARA-4.
> PERFORM PARA-1 THRU PARA-2.
> PERFORM PARA-2 THRU PARA-3 WITH TEST AFTER VARYING INDEX-1 FROM 10 BY 
> 3 UNTIL FLAG-1 > 0.
>
> It's that variable scope of a PERFORM that I don't recall seeing in 
> any other language.
>
> --CHuck
>
>
>
>


More information about the cctalk mailing list