Article View: bit.listserv.rexxlist
Article #369"Case" for REXX "Select"?
From: OPHOF SCOTT
Date: Tue, 11 Feb 1992 22:15
Date: Tue, 11 Feb 1992 22:15
25 lines
1630 bytes
1630 bytes
Dear list, There's a certain resemblance of the CASE construction in C, and SELECT in REXX. Both can be compared to multiple-choice IFs. That is, SELECT is a straightforward construction of sequential "IF..THEN..ELSE.." statements. CASE however is NOT, unless each & every case has its own BREAK. The nice thing about CASE is that when a case is true, expressions following it will be processed up to AND INCLUDING the next case (or BREAK, whichever comes first). Thus one can (as it were) "preprocess" statements relevant to a number of cases, and then "fall through" to test for relevant differences without needing to (effectively) duplicate code (once or even more times). It also removes the need for a subroutine, which would normally be the thing to do. Question: What are the pros and cons in re inclusion of CASE in the SELECT statement (as "fall-through" alternative to WHEN)? Regards. $$/
Technical Details
Message-ID:
<9202112215.AA12595@SERVER.uwindsor.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!auvm!SERVER.UWINDSOR.CA!OPHOFShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089df,ad181255a11720ad,start X-Google-Attributes: gid1089df,public X-Google-ArrivalTime: 1992-02-11 19:34:59 PST Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!auvm!SERVER.UWINDSOR.CA!OPHOF X-Mailer: ELM [version 2.3 PL11] Message-ID: <9202112215.AA12595@SERVER.uwindsor.ca> Newsgroups: bit.listserv.rexxlist Date: Tue, 11 Feb 1992 17:15:34 EST Sender: REXX Programming discussion list <REXXLIST@UGA.BITNET> From: OPHOF SCOTT <ophof@SERVER.UWINDSOR.CA> Subject: "Case" for REXX "Select"? Comments: To: REXX Discussion list <REXXLIST%UGA.bitnet@uga.cc.uga.edu>