COBOL now has:
PERFORM UNTIL EXIT
[...]
END-PERFORM
And it has finally been implemented in Enterprise COBOL (v6.4; backported to
v6.3 on my request!).
________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of
Andrew Rowley <[email protected]>
Sent: Tuesday, March 28, 2023 5:02 AM
To: [email protected] <[email protected]>
Subject: Re: Stop the ragging on COBOL please [was: RE: ASM call by value]
On 28/03/2023 9:34 pm, Seymour J Metz wrote:
> I once found myself defending the common idiom
>
> for (;;) {
> foo;
> }
>
> as a perfectly clear DO FOREVER.
I'm not sure that it is completely clear, it depends on knowledge if
whether the empty statement evaluates as true or false - or just a guess
that do forever is more likely than do never...
Personally, I prefer something like:
while (TRUE)
{
}
--
Andrew Rowley
Black Hill Software
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN