Here is a somewhat clumsy but seemingly workable solution:
EXPORT temp;
KEY K_Mul()
BEGIN
"i * + 'temp' |> ARG temp ABS"
END;
NB: This is an RPN only solution. Press Shift Help (User) x (Multiply) to start it.
What's missing is an automated ENTER ("\n" doesn't work.)
The need for the global temp variable arises because Ans doesn't work here. Ans is only set when the command line is completely executed.
Does adding RETURN(30); toward the end of the program do anything? Supposedly one can return a key value which then gets processed into the key.
Quote:
Does adding RETURN(30); toward the end of the program do anything? Supposedly one can return a key value which then gets processed into the key.
This will prevent the returning of the string itself. So it's either a string or a key but not both.
I have another idea but it would need some support from HP:
Allow a K_key() function to return a list of items which are fed to the input loop as if they were typed in. This would result in a useful macro facility.
What does the multi app do? Can you give me an example in RPN mode of its use?
Just hit [X] in user mode and the string is returned to the command line. Hitting ENTER executes it, converting the stack levels 1 and 2 to polar coordinates (which is just an example for the technique).