#49 Stem created / returned by a proc wrong in SysDumpVariables

v4.2.0
closed
Rick McGuire
none
5
2014-04-15
2005-02-28
mdlueck
No

If a procedure creates a stem, and reutrns it to the
code calling the proceudure, then SysDumpVariables is
called after the stem is returned, SysDumpVariables
shows the name of the stem per the proceudre, not the
name it was received as in the general code. This is
confusing when the main code needs several stems
created by the same procedure as SysDumpVariables shows
them all as the same stem name - UUUGGG!!! ;-)

ORexx 2.1.3 on Win32 and 2.3.4.0-4_i386

See the attached sample code for the concise
description of the problem.

Discussion

  • mdlueck
    mdlueck
    2005-02-28

    Example of error

     
    Attachments
  • Rick McGuire
    Rick McGuire
    2009-05-06

    SysDumpVariables is doing the correct thing. From the standpoint of the place where it the routine is called, it sees a stem with the locat name, not the name of the stem variable that is also referencing the same stem object in the calling context. SysDumpVariables only knows about the variables as they exist in the calling context, and in fact, the stem object referenced by the local variable need not even have been created from a stem variable in the first place.

     
  • Rick McGuire
    Rick McGuire
    2011-01-05

    Reopening this in the light of the behavior that was fixed with the NOVALUE reporting. This really should be returning the variable names, not the stem object names the variables are getting mapped to.

     
  • Rick McGuire
    Rick McGuire
    2011-01-05

    Committed revision 6557.

     
  • mdlueck
    mdlueck
    2014-01-24

    I believe this one looks resolved in 4.2.0 RC testing. Do you agree, Rick?

    $ rexx ReturnStemTest.rex 
         5 *-* stem1. = MyProc('Entry1', 'Data1')
        17 *-*   MyProc:
        17 *-*   procedure
        18 *-*   use arg entry, data
        20 *-*   THEstem. = 0
        21 *-*   THEstem.[entry] = data
        23 *-*   return THEstem.
         6 *-* stem2. = MyProc('Entry2', 'Data2')
        17 *-*   MyProc:
        17 *-*   procedure
        18 *-*   use arg entry, data
        20 *-*   THEstem. = 0
        21 *-*   THEstem.[entry] = data
        23 *-*   return THEstem.
         7 *-* stem3. = MyProc('Entry3', 'Data3')
        17 *-*   MyProc:
        17 *-*   procedure
        18 *-*   use arg entry, data
        20 *-*   THEstem. = 0
        21 *-*   THEstem.[entry] = data
        23 *-*   return THEstem.
         9 *-* call SysDumpVariables
    Name=STEM1.Entry1, Value='Data1'
    Name=STEM3.Entry3, Value='Data3'
    Name=SIGL, Value='7'
    Name=STEM2.Entry2, Value='Data2'
        11 *-* say stem1.['Entry1']
    Data1
        12 *-* say stem2.['Entry2']
    Data2
        13 *-* say stem3.['Entry3']
    Data3
        15 *-* exit 0
    
     
  • Rick McGuire
    Rick McGuire
    2014-01-24

    • Pending work items: --> none
    • Group: vX.X.X --> v4.2.0
     
  • Rick McGuire
    Rick McGuire
    2014-04-15

    • status: pending --> closed
     


Anonymous


Cancel   Add attachments