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.

    foo=.stem~new
    foo['bar']='Lower'
    foo['BAR']='Upper'

creates two elements in foo, allowing you to get around the way value() behaves.


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

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [0000000433f07816-dmarc-requ...@listserv.ua.edu]
Sent: Tuesday, February 2, 2021 3:46 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx stem variable question

On Tue, 2 Feb 2021 19:16:52 +0000, Seymour J Metz wrote:

>The behavior of value() is confusing in that it violates the law of least 
>astonishment; naively I would expect value('AAA.bbb') and value('AAA.BBB'), ...
>
Those arguments name the same compound symbol,
therefore the results are identical, regardless of how
or whether BBB, BBb, etc. are defined.  Consider:
    Bbb = 'Wombat'
    say AAA.bbb value( 'AAA.bbb' )
    say AAA.BBB value( 'AAA.BBB' )

>but that is neither how it is documented nor how it works.
>
That is both how it's documented and how it works.
Otherwise, cite.

>In OOREXX a trailing period is enough to designate a stem. However, if you 
>want a stem variable whose name does not end in a period, then you need to 
>explicitly initialize it.
>
How do you refer to its members?

>OOREXX does have enumerators.
>
Have you submitted your RFE yet?
If one builds OOREXX from source on z/OS, will it easily interface
to unmodified valuable host command environments such as SDSF
and SYSCALL?

How does it report gaps in a compound symbol, e.g.:
    A. = 'Foo'
    drop A.42

Also:
    A. = 'Foo'
    Z = ''
    A.Z = 'Nil'

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to