Rich kids are into COBOL

Eric Smith spacewar at gmail.com
Wed Feb 18 14:35:30 CST 2015


On Wed, Feb 18, 2015 at 9:55 AM, Sean Conner <spc at conman.org> wrote:
> It was thus said that the Great Chuck Guzis once stated:
>> 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.
>
> Um ...
>
>   for i = 1 , 23 do
>     para_1()
>     para_2()
>     para_3()
>     para_4()
>   end


No. In the COBOL example PARA-1 though PARA-4 are consecutive
paragraphs, not functions that are terminated by a return (explicit or
implicit).  If you want to think of it as a function, the paragraphs
are all part of a single function, but both the entry and return
points of the function are variable, specified by the caller!

No one claimed that it wasn't possible to achieve the equivalent
effect of such a program using normal constructs of other languages;
it would just have to be structured differently.


More information about the cctalk mailing list