Post Reply 
Simple HP Prime Program
11-01-2016, 05:43 PM
Post: #1
Simple HP Prime Program
On my previous HP calculators I've had a very simple program for metric conversion.

Name: MM
<< 25.4 / >>

Name: IN
<< 25.4 8 >>

I would place a number on the stack and hit the softkey with the function I wanted.

I can't figure out how to achieve this on the HP Prime. Can someone please point me in the correct direction.

Also, I am using the RPN input format.

Thank you.
Find all posts by this user
Quote this message in a reply
11-01-2016, 05:50 PM (This post was last modified: 11-01-2016 05:50 PM by toml_12953.)
Post: #2
RE: Simple HP Prime Program
(11-01-2016 05:43 PM)cmadon Wrote:  On my previous HP calculators I've had a very simple program for metric conversion.

Name: MM
<< 25.4 / >>

Name: IN
<< 25.4 8 >>

I would place a number on the stack and hit the softkey with the function I wanted.

I can't figure out how to achieve this on the HP Prime. Can someone please point me in the correct direction.

Also, I am using the RPN input format.

Thank you.
create a function:

Code:
EXPORT MM(x)
BEGIN
  RETURN x/25.4;
END;

Then to convert 16 mm to inches, call it like this:

16 <Enter>
MM(1) <Enter>

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
11-01-2016, 06:03 PM
Post: #3
RE: Simple HP Prime Program
Thanks a ton.

One additional question, how can I save this to a softkey and have it so I type the number then just press the associated softkey?
Find all posts by this user
Quote this message in a reply
Post Reply 




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