Access RPN stack result in PPL program?
|
09-05-2014, 01:38 AM
(This post was last modified: 09-05-2014 01:40 AM by oldhpfan.)
Post: #2
|
|||
|
|||
RE: Access RPN stack result in PPL program?
(09-04-2014 10:26 PM)gbh Wrote: How do I access the value in the lowest level of the RPN stack (x, level 1) in a PPL program? So far as I can tell there is no way to access the stack functions like echo from PPL as they seem to be interactive only (it would be nice if you could do something like x:= Echo(1); in a program and it would give you the value from level 1 of the stack, alas it doesn't work). So unless someone out there knows how to do this the only work around I can think of would be to store the value from the stack into a variable and then use that variable in your program. e.g. 5 Enter 'D' sto (put 5 on the stack as an example and store in the global variable D you could also create your own variable). In the program you could square by doing: D:=D*D; or whatever you want to do with it. Remember it's a global variable so be careful as other programs could change the value. Another option if you have several things on the stack would be to use the list stack function to create a list, store the list in a variable then access the list in your program. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Access RPN stack result in PPL program? - gbh - 09-04-2014, 10:26 PM
RE: Access RPN stack result in PPL program? - oldhpfan - 09-05-2014 01:38 AM
RE: Access RPN stack result in PPL program? - John R. Graham - 09-05-2014, 06:45 PM
RE: Access RPN stack result in PPL program? - oldhpfan - 09-06-2014, 03:23 AM
RE: Access RPN stack result in PPL program? - jayhawk - 11-22-2014, 07:20 PM
|
User(s) browsing this thread: 1 Guest(s)