I may have misunderstood you, Shmuel, but I think you must have meant "REXX
has only the latter".  The REXX select statement looks like this:

  select
    when boolexpr1 then stm
    when boolexpr2 then stm
    otherwise stm; end

VBA, on the other hand, has only the former:

  Select Case MyVar
    Case "T": stm
    Case "X": stm
    Case Else: stm
    End Select

You can simulate the latter (more general) form in VBA easily enough:

  Select Case True
    Case boolexpr1: stm
    Case MyVar = "X": stm
    Case Else: stm
    End Select

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* I have an efficient feeding technique, and within a few minutes, every
last spoonful of that glop is somewhere in Sophie's hair.  I aim for her
mouth, but she moves too fast.  Sophie will try to eat virtually any random
thing she finds on the floor, including a dead cockroach, but she draws the
line at baby food.  -Dave Barry, 2000-09-17 */

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
Seymour J Metz
Sent: Wednesday, March 29, 2023 11:38

SELECT in PL/I has two forms: one provides a variable matched against the
various WHEN clauses and one in which each WHEN has a boolean (well, BIT(1))
expression. REXX has only the former, whichis equivalent to IF/ELSEIF/ELSE.

----------------------------------------------------------------------
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