> Sounds like a personal problem to me.

Or he's using a prettyprinter that can't handle it well.

> Or, you could use ELSEIF and just not indent.

PL/I has no such statement; with SELECT there's no further need for it.

> I wish ITERATE I and LEAVE I allowed I to be an EXPOSEd nonlocal variable.

Controlling the loop from a subroutine outside the loop sounds extremely error 
prone.

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [0000042bfe9c879d-dmarc-requ...@listserv.ua.edu]
Sent: Wednesday, March 29, 2023 11:18 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Stop the ragging on COBOL please [was: RE: ASM call by value]

On Wed, 29 Mar 2023 09:38:50 -0400, Bob Bridges wrote:

>I suppose so, but I always use SELECT, never ELSEIF.  I think it's because 
>with ELSEIF I feel compelled to indent each clause as if it were an "ELSE IF",
>
Sounds like a personal problem to me.

>and I abominate those long increasingly indented constructions:
>
>  if expr1 then stm1
>  else if expr2 then stm2
>    else if expr3 then do
>        blah blah blah; end
>      else if expr4 then stm4
>        else if expr5 then stm5
>
>SELECT allows me to avoid that.
>
Or, you could use ELSEIF and just not indent.

I've seen some horribly hyperindented REXX code from IBM on CMS.  Like:
    IF ...
      THEN
        DO
          yada
          yada
        END

I code:
    IF ... THEN
THEN on the same line.  Its only purpose is to terminate a boolean expression.

>I love the iterate statement for much the same reason:
>
Ir's a more disciplined alternative to GOTO.

I wish ITERATE I and LEAVE I allowed I to be an EXPOSEd nonlocal variable.

--
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to