Post Reply 
Calculators you regret buying?
12-13-2023, 12:30 PM
Post: #27
RE: Calculators you regret buying?
(12-12-2023 05:38 AM)carey Wrote:  
(12-11-2023 11:05 PM)Valentin Albillo Wrote:  ...Stack juggling is virtually incompatible with "readability".

True, and all too common in single-file RPL programs. However, the best practice for writing RPL, demonstrated beautifully by D. R. Mackenroth (of HP) in his book HP48 Programming Examples is to create a separate directory for each program, consisting of a main program that calls several small subprograms (similar to sound Forth practice). Mackenroth gives a simple example of computing the hypotenuse of a triangle where the main program <<GetA GetB ComputeH Label>> is just a series of subprograms (verbs) that employ minimal stack juggling. Nice and readable!

This is the technique I try to employ when I need to write anything significant in RPL. Also use plenty of local variables. Whether or not that kind of design is appropriate for a handheld calculator is certainly up for debate, however.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Calculators you regret buying? - ijabbott - 12-10-2023, 09:59 AM
RE: Calculators you regret buying? - carey - 12-12-2023, 05:38 AM
RE: Calculators you regret buying? - Dave Britten - 12-13-2023 12:30 PM
RE: Calculators you regret buying? - Johnh - 12-11-2023, 03:28 AM
RE: Calculators you regret buying? - carey - 12-11-2023, 03:54 PM
RE: Calculators you regret buying? - ttw - 12-11-2023, 04:27 PM
RE: Calculators you regret buying? - cjsuk - 12-13-2023, 08:09 PM



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