1. IMHO, VALUE is much easier to read
 2. It is trivial to use INTERPRET to assign a lower case values.
 3. I'm confident that VALUE is less expensive, but it's easy to test.


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

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Lionel B. Dyck [[email protected]]
Sent: Monday, September 13, 2021 7:44 AM
To: [email protected]
Subject: REXX - Interpret or Value - Which is better?

>From a programming standpoint which is (a) more efficient, and (b) easier to
understand - Interpret or Value.

Examples:

/* rexx */
/* setup our defaults to start with */
istr = 'abc'
vstr = istr

/* value examples */
newvar = value(vstr,'def')
say newvar
say vstr value(vstr)
newvar = value(vstr''1,'second')
say newvar
say vstr''1 value(vstr''1)

/* interpret examples */
interpret 'istr = def'
interpret 'say' istr 'istr'
interpret 'istr'1 '= second'
interpret 'say' istr''1 'istr'1

The main differences that I can see is that with interpret the new values
are uppercase, and with value the return contains the new variable name.

Lionel B. Dyck <><
Website: 
https://secure-web.cisco.com/1vhdaOMu99lOkLVHd1fGwL1HDR4MhII1jeez_Bt35wqky9KWMh7V8-kqZAv7_YIwF1xNlRxn9RttzO1U_2M6IFt481OFcKIWlx424rETx6I6_4vdIrTlhj9zwXEFMAQT5mc_c3v6e4H_OGmUFrbqlr9UzD0Zz__PoDT2ihXJVwU-nn-dTMvM-ya8YfvU58JXMrtbTCAJOBST578GJEt-qaAMB1TZVXDPjA3Edg4buJS6PmzorAF2t9rrcncvQff3G71A7cZVb9vCq1fWO-YvTkMxVQQwkwXftk1FVGBYR40yIohy8QmpZJZxkPsz_i-wlhXy9-rN1EeA3vDQazGP33tCPpag3CkYFqzJK_-GskA6e61zUqmrtnV8x5SRpZl21-eBJZxTzv0fOwsPW3FCT4DtHOyeG6Xqc3o62WDmxhKJI8vXyPsOgwvXGMr21-zYY/https%3A%2F%2Fwww.lbdsoftware.com
Github: 
https://secure-web.cisco.com/1GnGK-7GgbKK644_XPNi5n_MPQRya1rk39wmZOYQQ5WX_GKYb3HDlqnt9TXBUnp-Bd59TJ1FB8Vc4OoOWbup3L522mhG66K4aSZTn792Y9raT_EJs7JTA2spmKoZVsq2oGHgNT2okiwy0nAriN18K6wB8vryK9M31FdkHswC-csYXyPSTto6jzSLbB8bzsoZ_p7bfQqy11uWdGRH5TH-4w5W_cGkwbBM4TsBLueC4GdHxGIiEvjN7wlvugUqqc3ajyjFdZnygq6HFeulDoZghc8YR-RXLAyRsY1zGT9ikeF4ggOVoECgjoLcbnDIxFQXY9oOuWM858r1OURpJ0-njNTsZGoJWlnh7dJp-iS-fNVizSdtZdfbSmWZkEgFgTo2_EKPQI6kkFEvdhVFFINhufa06AQgwBioDjGj7gAY6xJGxDNY96sJT_GieNAmEgtX1/https%3A%2F%2Fgithub.com%2Flbdyck

"Worry more about your character than your reputation. Character is what you
are, reputation merely what others think you are."   - - - John Wooden

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to