On Sat, 30 May 2020, at 11:54, Jeremy Nicoll wrote:
> On Sat, 30 May 2020, at 11:44, Lionel B Dyck wrote:
> 
> > /* rexx */                                          
> > 
> > test = 'testx'                       
> > 
> > interpret 'test'.1 '= var'   
> 
> That first builds the string  "test.1 = var" then executes it

For what I think you expected you'd have needed to code

   interpret test'.1 = var'

so first the string "textx.1 = var" is built, then that is executed.


It's FAR clearer, to use the value() function, eg

   namofvar = "testx.1"
   newvalue = var
   oldvalue  = value(namofvar,newvalue)

noting that value returns the existing value of the named variable
as well as (if there's a second parm) resetting it.


-- 
Jeremy Nicoll - my opinions are my own.

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

Reply via email to