Printing to stack for free42/plus42
|
11-06-2023, 01:17 PM
Post: #1
|
|||
|
|||
Printing to stack for free42/plus42
Good afternoon/morning to everyone.
I have a question that I feel is trivial but I have not been able to find a clear answer/example for. I want to calculate a quantity and then based in that print to the stack several values based on that quantity I.e 60% of the quantity 70% of the quantity and so on with a label for each line. Is there a straightforward way to do that? In most programming languages we can do string interpolation and produce formatted strings. Is there a way to do that with rpn? Thank you very much |
|||
11-06-2023, 02:23 PM
(This post was last modified: 11-06-2023 02:31 PM by Eddie W. Shore.)
Post: #2
|
|||
|
|||
RE: Printing to stack for free42/plus42
On the HP 42S family, the stack can only hold alpha strings up to six characters. ASTO stores the first six characters of the alpha string to the stack or a variable.
We could be looking at, something like: Z: "60°/.=" T: 60% of the number Y: "70°/.=" X: 70% of the number (pause... do the next pair of calculations) There is no % character in alpha, so I have to construct it in three characters. - - - - - Here is a program that uses the print-out feature which can print out multiple answers with labels. (but not to the stack itself) QUANTITY? 180 *** 60°/.= 108.16218 70°/.= 126.16218 80°/.= 144.16218 90°/.= 162.16218 Code: 00 { 59-Byte Prgm } Sample print out: Code: QUANTITY? Hope this helps. |
|||
11-06-2023, 02:39 PM
Post: #3
|
|||
|
|||
RE: Printing to stack for free42/plus42
(11-06-2023 02:23 PM)Eddie W. Shore Wrote: There is no % character in alpha, so I have to construct it in three characters. It's right there on the keyboard? shift-RCL Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
11-06-2023, 02:40 PM
Post: #4
|
|||
|
|||
RE: Printing to stack for free42/plus42
(11-06-2023 02:23 PM)Eddie W. Shore Wrote: On the HP 42S family, the stack can only hold alpha strings up to six characters. ASTO stores the first six characters of the alpha string to the stack or a variable. Hi Eddie, Yes this is very close to what i need. In my case my printer is always on because i want to keep a log of all my calculations, so this would work quite well. Thanks you very much |
|||
11-06-2023, 05:56 PM
(This post was last modified: 11-06-2023 05:57 PM by Nigel (UK).)
Post: #5
|
|||
|
|||
RE: Printing to stack for free42/plus42
Unlike the HP42S, Free42 does support unlimited length strings. It’s worth looking at the string and list extensions documentation here to see what’s available.
Nigel (UK) |
|||
11-07-2023, 12:00 AM
Post: #6
|
|||
|
|||
RE: Printing to stack for free42/plus42
(11-06-2023 05:56 PM)Nigel (UK) Wrote: Unlike the HP42S, Free42 does support unlimited length strings. It’s worth looking at the string and list extensions documentation here to see what’s available. Cheers, in this case the string length I want to print is even within the original 42s rest. |
|||
11-07-2023, 03:32 AM
Post: #7
|
|||
|
|||
RE: Printing to stack for free42/plus42 | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)