rmkit-dev / rmkit

| remarkable app framework | https://rmkit.dev
https://build.rmkit.dev
365 stars 32 forks source link

[rpncalc] No DUP command? Modify PUSH so that it duplicates last item #184

Closed cesss closed 1 year ago

cesss commented 1 year ago

Isn't the DUP command implemented? It's one of the commands I use most in the HP48G. It just duplicates the last item of the stack. In the HP48G it is issued when you press the "ENTER" key.

But rpncalc has "PUSH" instead of "ENTER", so I guess that you could modify "PUSH" so that it pushes a duplication of the last item in the stack.

It's very useful because you need to duplicate temporary results quite often (for keeping them and reusing them later). Or sometimes for using multiplication instead of power.

cesss commented 1 year ago

I'm closing this issue because the addition of the DUP functionality has been addressed while adding a NEG command here: https://github.com/rmkit-dev/rmkit/issues/185