Re: CASE constructs

2023-04-02 Thread Rupert Reynolds
I don't know enough COBOL to contribute much more on that score. But I can now recall some of the COBOL programmer's words, "ALTER GOTO is the only sensible support for structured programming" which sounds like an eccentric view, if not actually mad :-) He was clearly good at his job, though, and

Re: CASE constructs

2023-04-02 Thread Seymour J Metz
To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: CASE constructs I seem to remember that most of the perceived weaknesses in COBOL were addressed a long time ago. But some old tales just won't die. Back when JSP meant Jackson Structured, I remember being told that PL/I supported selection directly wi

Re: CASE constructs

2023-04-01 Thread Paul Gilmartin
On Sat, 1 Apr 2023 11:30:24 +0100, Rupert Reynolds wrote: >... >while in COBOL people were using ALTER with GOTO (oof!). > ??? But didn't they need a CASE/SELECT to choose which ALTER? -- gil -- For IBM-MAIN subscribe / sign

Re: CASE constructs

2023-04-01 Thread Rupert Reynolds
I seem to remember that most of the perceived weaknesses in COBOL were addressed a long time ago. But some old tales just won't die. Back when JSP meant Jackson Structured, I remember being told that PL/I supported selection directly with 'SELECT', while in COBOL people were using ALTER with GOTO

Re: CASE constructs

2023-03-31 Thread Frank Swarbrick
COBOL: EVALUATE A = 1 WHEN TRUE [...] WHEN FALSE [...] END-EVALUATE (WHEN FALSE could be WHEN OTHER in this case.) Not many people would use this over IF ELSE, but it's available. There's also "EVALUATE TRUE" where each WHEN is a full evaluation, eliminating any need for IF ELSE/IF ELSE/IF ELS