New to RPL; Please critique this working sample. Thanks.
|
09-14-2016, 05:56 AM
(This post was last modified: 09-14-2016 06:01 AM by Nick.)
Post: #1
|
|||
|
|||
New to RPL; Please critique this working sample. Thanks.
I'm new to RPL. Please critique the following code. I was surprised at the amount of nesting required to implement the local variable + algebraic object style -- that I could not simply keep accumulating (or even reusing) the local variables across multiple objects within the same scope.
Device: HP-48G [Revision R] Formula: http://www.cs.utsa.edu/~cs1063/projects/...ation.html Input: M D Y Output: JD This was my first thought (failed): Code: << -> m d y ...but experimentation showed that the local variables are only accessible to the algebraic or program object immediately following their definition and any subsequent objects within the same scope lose access to the previously defined local variables after additional were defined. The corrected code: Code: << -> m d y Is this appropriate / necessary for handling multiple formulas and the creation of additional local variables? It seems the structure and scope could get messy. Any feedback is appreciated. Thanks, Nick Edit: Added Device Model / Revision |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
New to RPL; Please critique this working sample. Thanks. - Nick - 09-14-2016 05:56 AM
RE: New to RPL; Please critique this working sample. Thanks. - wojtek - 09-14-2016, 09:40 AM
RE: New to RPL; Please critique this working sample. Thanks. - Nick - 09-14-2016, 10:37 PM
RE: New to RPL; Please critique this working sample. Thanks. - DavidM - 09-14-2016, 02:12 PM
RE: New to RPL; Please critique this working sample. Thanks. - Philippe - 09-14-2016, 09:51 PM
RE: New to RPL; Please critique this working sample. Thanks. - Nick - 09-14-2016, 11:59 PM
|
User(s) browsing this thread: 1 Guest(s)