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
