Post Reply 
HP-48G local variables within subroutine
05-18-2023, 09:12 PM
Post: #11
RE: HP-48G local variables within subroutine
(05-17-2023 10:33 PM)2old2randr Wrote:  You can do
« 0 → a b c « a b * c STO ... » »
i.e., push 0 onto the stack and then assign to 'c' over the same scope as 'a' and 'b'.

Another way would be
« → a b « a b * → c « ... » » »

The second form may be preferable when you have deeply nested code. Here 'c' is visible only in the innermost scope.

Slight correction on the first version - c needs to be quoted in order to store into it.
« 0 → a b c « a b * 'c' STO ... » »
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-48G local variables within subroutine - BruceH - 05-18-2023 09:12 PM



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