• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended
I want to do a simple macro style program. To simplify, say I have a number in the 'x' register of the stack. I want to press a key and do a few steps of math on that value. Such as, multiple it by a number, subtract a number. I don't see how this is done on this calculator. The other HP RPN calculators made this very easy.
4 REPLIES 4
HP Recommended

Hi,

Unfortunately you can't write RPN style programs on the Prime, only HP Prime Basic programs.

For example if you have two values on the stack the following program will return the division of the values:

EXPORT PROG1(A,B)
BEGIN
RETURN A/B;
END;

Note that currently only one value can be returned to the stack. You can return multiple values in a list, but not on separate stack levels.

-Bart
_________________________________________________________
calculator enthusiast
HP Recommended

This seems to just prompt for an input, it doesn't take the value from the stack

HP Recommended

That happens when you run it from the program menu. If you run it from the HOME screen (type PROG1 then ENTER) it will take values from the stack and return the answer. It can also be run from the Home screen by pressing Toolbox then User softkey then select PROG1, press ENTER with empty ().

-Bart
_________________________________________________________
calculator enthusiast
HP Recommended

 

Thanks, that helps a lot. Doesn't seem like a lot of this stuff is documented.

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.