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 [email protected] with the message: INFO IBM-MAIN

Reply via email to