On Mon, 13 Sep 2021 06:44:44 -0500, Lionel B. Dyck <[email protected]> wrote:

>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.
>
Both VALUE() and INTERPRET preserve case of properly quoted symbols.
Your confusion reinforces Shmuel's contention that VALUE() is easier to
understand.

I believe VALUE() returns the value of the first arrgunent prior to the 
assignment.

INTERPRET might win in performance by avoiding call/return overhead.
Testing necessary.

It would be informative to rerun your tests with SIGNAL ON NOVALUE.

TSO-REXX LISTSERV might provide more specialized opinions:
    
<mailto:[email protected]?subject=Request%20--%20Thanks!%0D%0A&body=INFO%20TSO-REXX%0D%0AThanks%0D%0A>

-- gil

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

Reply via email to