advantages of RPN
|
05-22-2014, 09:44 AM
Post: #14
|
|||
|
|||
RE: advantages of RPN
(05-22-2014 01:25 AM)Garth Wilson Wrote: However, the algebraic one cannot re-use intermediate parts of the equation without storing them in a variable for later retrieval; whereas with a stack, you can dup it. Things get hairy when you have lots of parts of a program needing temporary variables. Is a particular one free at the moment, or will I step on something still needed by a pending routine? It may be fine now, but what happens if I have to come back later and modify it? Did I document well enough which ones were used where, and when, or will it mess up and then a part I didn't touch quits working, because I used its temporary variable in my other modified routine? It can be a debugging nightmare. A stack reduces the need for variables, and makes program maintenance much easier. These temporary variables cease to exist when they're no longer needed. I like RPN a lot, but my Prime is set to algebraic mode. What I like so much about algebraic mode on the Prime (and on calculators like the TI NSpire, TI-89, etc.) is that there is a visible and re-usable history of all calculations. I virtually never need to use variables to store results because previous results - and the calculations that led to them - are always available. I still need variables in programs, but with the Prime's structured language variable conflicts aren't a problem. RPN has real advantages on a single-line display machine but on the Prime I like algebraic better. Nigel (UK) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)