OOREXX has a use arg instruction
foo['bar'] isn't a symbol, it's a method invocation equivalent to
foo~[]=('bar') or foo~[]('bar'), depending on whether it is on the LHS or the
RHS
For methods you would use ::EXPOSE and directories (sort of symbol tables) to
control visibility..
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of
Paul Gilmartin [[email protected]]
Sent: Tuesday, February 2, 2021 6:47 PM
To: [email protected]
Subject: Re: Rexx stem variable question
On Tue, 2 Feb 2021 23:30:52 +0000, Seymour J Metz wrote:
>Read it again. What I would naively expect is *NOT* how it works. The fact
>that value() does the same processing on it's first argument as what would be
>done if the value were substituted in the source code is wildly unexpected
>behavior, although well documented.
>
The more times I read it, the less naive I become. And the
behavior of value( 'name' ), symbol( 'name' ), and datatype( name )
are comfortably similar.
> foo=.stem~new
> foo['bar']='Lower'
> foo['BAR']='Upper'
>
>creates two elements in foo, allowing you to get around the way value()
>behaves.
>
How would you apply value() and symbol() to such items?
say value( "foo['bar']" )
say value( "foo['BAR']" )
???
How would you EXPOSE them to a PROCEDURE?
It's a shame that the Rexx Standard does not allow expressions
in compound tails.
-- gil
----------------------------------------------------------------------
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