Post Reply 
Single User Defined Program Key Press to Answer.
07-06-2021, 09:39 PM (This post was last modified: 07-06-2021 09:40 PM by matalog.)
Post: #1
Single User Defined Program Key Press to Answer.
This little program, will take the last entry in the stack (in Algebraic mode anyway) and use it to display the subtotal, and amount of tax.

KEY K_Ln()
LOCAL G:=ROUND(Ans(1)/1.2,2);
LOCAL H:=ROUND(Ans(1)/6,2);
LOCAL I:={};

It assumes the last number on the stack is the total including tax, and that you want, what the total would have been before tax, and the amount of tax. Pressing LN activates it.

Rather than teaching people how to calculate tax, it is an example of a program that works by a single keypress and displays a result.

Return 46; at the end of the program ensures that the program doesn't return anything to the stack, or the live calculator line. It basically presses the On button, which I assume to be harmless.

Any suggestions of a way to get the result to the stack would be very welcome!
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Single User Defined Program Key Press to Answer. - matalog - 07-06-2021 09:39 PM

User(s) browsing this thread: 1 Guest(s)