Posts: 3,283
Threads: 104
Joined: Jul 2005
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.
Posts: 709
Threads: 104
Joined: Nov 2005
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.
Posts: 3,283
Threads: 104
Joined: Jul 2005
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.
Posts: 3,283
Threads: 104
Joined: Jul 2005
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.
Posts: 18
Threads: 6
Joined: Aug 2013
What does the multi app do? Can you give me an example in RPN mode of its use?
Posts: 3,283
Threads: 104
Joined: Jul 2005
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).