The simplest way to accomplish that is:
Code: Select all
LBL "T"
MVAR "X"
LBL "T"
END
Cheers, Werner
Code: Select all
LBL "T"
MVAR "X"
LBL "T"
END
Code: Select all
int docmd_pgmslvi(arg_struct *arg) {
/* This command can only be invoked from a menu; we assume that
* the menu handler only gives us valid arguments. We do check
* the argument type, but the existence of the named label, and
* whether it actually has MVAR instructions, we just assume.
*/
Hmmm, I'd expect the following:
Code: Select all
X Y Z
1 1 y
ENTER 1 1 y
NEWMAT [0] y
EDIT [0] y
5 [5] y
EXITALL [5] y
I think that does make sense in that OLD is a reasonable name to put in the menu in the matrix editor. That it does exactly the same thing as RCLEL isn't immediately obvious, or at least it wasn't to me; IIRC I only realized it when I started implementing the matrix functions.
Reasonable, but on the other hand there is also the precedent of ΣREG?
Huh! I didn't know that. But there's no reason to simulate that anyway. The way shared matrices are handled, both on the HP-42S and in Free42, is designed to make it look like every matrix is separate anyway, and sharing them is just a performance optimization. The fact that the HP-42S misses one opportunity to apply that optimization doesn't cause any issues except wasting some RAM and CPU cycles.