> Conscientious documentation of Rexx avoid the word
> "default" in this context for two reasons:
> `1. The expression is assigned to the stem with every
>    possible tail, not to only those not previously given
>    a value.

Not so; ooRexx is not SAA rex. The ooRexx documentation uses the word default 
because it *is* appropriate in the context of ooRexx.

> 2. If an individual member of the compound is DRO ped,
>    its value returns to the standard UPPER(stem.tail), not
>   the value assigned earlier to the stem.

That's because DROP does not set a compound variable to the default value of 
the stem.

The test below is from OREXX rather than ooRexx, but the results should be the 
same.

Tue  7-02-24 12:56:11{2}[h:\] rexxtry
  REXXTRY.CMD lets you interactively try REXX statements.
    Each string is executed when you hit Enter.
      Enter 'call tell' for a description of the features.
  Go on - try a few...             Enter 'exit' to end.
foo.=bar
  ................................................ REXXTRY.CMD on OS/2
drop foo.baz
  ................................................ REXXTRY.CMD on OS/2
say foo.baz
FOO.BAZ
  ................................................ REXXTRY.CMD on OS/2
say foo.foo
BAR
  ................................................ REXXTRY.CMD on OS/2
say foo.~makearray
an Array
  ................................................ REXXTRY.CMD on OS/2
say foo.~makearray~items
0
  ................................................ REXXTRY.CMD on OS/2


--
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, July 2, 2024 12:09 PM
To: [email protected]
Subject: Re: Rexx is quite cool, flexible, powerful, feature-rich, thank you! 
(Re: z/OS 3.1 Enhancements & Support News

On Tue, 2 Jul 2024 15:24:29 +0000, Seymour J Metz wrote:

>> I notice you didn't discuss;
>>>    A. = 'Preset'
>> >    drop A.GAP
>
>Because neither has an effect on the loop.
>
>>     Further, when a stem is used as the target of an assignment,
>>    all possible compound variables whose names begin
> >   with that stem receive the new value,
>
>That text is for TSO/E (classic) REXX, not for ooRexx.
>
Yes, that's where I found it.

>> Or do I fail to understand that in oo the first instruction
>> replaces the compound symbol with a single string
>> object; leaving no members to DROP?
>
>No, is sets the object name and default value.
>
Conscientious documentation of Rexx avoid the word
"default" in this context for two reasons:
`1. The expression is assigned to the stem with every
   possible tail, not to only those not previously given
   a value.
2. If an individual member of the compound is DRO ped,
   its value returns to the standard UPPER(stem.tail), not
   the value assigned earlier to the stem.

Both CMS REXX and TSO/E REXX have at  various times
broken the second rule by service, and I needed to open
APARs to repair them.  I suspect the motivation for the
disservice was performance.

Which "default" does ooRexx use after assignment to a
stem and DROPping an individual member?

>"If the new value is not a Stem object, a new Stem object is created and 
>assigned to
>the stem variable, replacing the Stem object currently associated with the 
>stem variable.
>The new value assigned to the stem variable is given to the new Stem object as 
>a default value.
>Following the assignment, a reference to any compound symbol with that stem 
>variable
>returns the new value until another value is assigned to the stem, the Stem 
>object,
>or the individual compound variable."

>________________________________________
>From:  Paul Gilmartin
>Sent: Tuesday, July 2, 2024 10:38 AM
>
>On Tue, 2 Jul 2024 01:51:36 +0000, Seymour J Metz wrote:
>
>>do i over A.
>>    say 'A.'i '=' A.i
>>    end
>>
>>Shouldggive only one line: "A. = I dunno".
>>
>I notice you didn't discuss;
>>    A. = 'Preset'
>>    drop A.GAP
>
><https://www.ibm.com/docs/en/zos/3.1.0?topic=symbols-stems>
>    Further, when a stem is used as the target of an assignment,
>    all possible compound variables whose names begin
>    with that stem receive the new value,
>
>Or do I fail to understand that in oo the first instruction
>replaces the compound symbol with a single string
>object; leaving no members to DROP?
>
>>________________________________________
>>From:  Paul Gilmartin
>>Sent: Monday, July 1, 2024 8:32 PM
>>
>>What does DO OVER do for the analogue of REXX:
>>    A. = 'Preset'
>>    drop A.GAP
>>    Null = ''; A.Null = "I dunno"
>>???

--
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

Reply via email to