[comp.sys.handhelds] HP48/28 Local Variables

paul+@andrew.cmu.edu (Paul J. Dujmich) (04/09/90)

Hi to everyone on the list.

I have a question concerning local variables as used on the 48/28.
I understand that:

                   <<  -> a b c
                        <<
                           function body
                           >>
                   >>

will pull 3 values off the stack and load them into the local variables
a, b, and c. My question is....... How do you print one of these local
variables, say on line 1 of the display?
For instance,   a 1 DISP    dosen't seem to work.  'a' 1 DISP dosen't work
either. I can use 'a' STO and 'a' RCL , but this creates variables in the
current directory. If an error occurs in your program, the variables are
left behind to be purged manually.
It's a very elementary question, but I didn't do much programming on my
28 when I had it, and now that I've got the 48, I would really like to
understand this concept.


Paul

billw@hpcvra.CV.HP.COM (William C Wickes) (04/11/90)

If     a 1 DISP    is in the function body, the contents of a will be displayed
in line 1:

123 -> a << a 1 DISP >>

displays 123.  This display is temporary, and is cleared when the program
is finished; you can make it hang around by including 1 FREEZE after the
DISP.