Idea Delivered

This was delivered with XPP 9.4.

Access Named number registers from xyPerl

The value of number registers can be read directly from xyPerl using the $X->get_reg(#NUMBER) function.

But for named number registers there is no equivalent function.
It would be nice if there would be a $X->get_named_reg(NAME, LEVEL) function (or similarly named function).
Currently you have to use the $X->nnx(NAME, LEVEL, X-register) and then do a $X->get_reg(xNUMBER) in order to access the value stored in a named register.
That is a bit a cumbersome and confusing way for something that should be simple.

Parents
  • And I forgot to include the strongest argument why we need this!
    Currently when you use the workaround of a $X->nnx() followed by a $X->get_Reg() you will most probably end up with the wrong answer. 
    That is because the nnx macro will not get executed immediately (only when the perl function ends it will).
    So your $X->get_reg() (that does gets executed immediately) will give you the value stored in that x register before the perl function was started!!!

    In short a $X->get_named_reg() function would not only be nice, but it is absolutely necessary that we get this function implemented ASAP

Comment
  • And I forgot to include the strongest argument why we need this!
    Currently when you use the workaround of a $X->nnx() followed by a $X->get_Reg() you will most probably end up with the wrong answer. 
    That is because the nnx macro will not get executed immediately (only when the perl function ends it will).
    So your $X->get_reg() (that does gets executed immediately) will give you the value stored in that x register before the perl function was started!!!

    In short a $X->get_named_reg() function would not only be nice, but it is absolutely necessary that we get this function implemented ASAP

Children
No Data