HP-50g Local variable and Global variable confusion
|
04-08-2017, 09:28 PM
(This post was last modified: 04-08-2017 09:38 PM by TravisE.)
Post: #3
|
|||
|
|||
RE: HP-50g Local variable and Global variable confusion
^ Local variables can exist during interactive operation when a program executes HALT within a local variable block. However, I don't know of a built-in way to display a list of current local variables. At any rate, they will be automatically destroyed once all suspended programs are allowed to continue to completion or the KILL command is executed.
One way to refer to local variables in an expression (this works on the 50g; I don't recall on which model this feature was first introduced) is to name the variable starting with a left-arrow (←) character. The editor will always compile variables with such names to refer to local variables, whether or not they actually exist at compile time. The following, for instance, should return 10 when executed: Code: « '2*←X' 'F' STO |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP-50g Local variable and Global variable confusion - rui.c.sousa.99 - 04-07-2017, 09:44 AM
RE: HP-50g Local variable and Global variable confusion - Han - 04-07-2017, 05:28 PM
RE: HP-50g Local variable and Global variable confusion - TravisE - 04-08-2017 09:28 PM
RE: HP-50g Local variable and Global variable confusion - rui.c.sousa.99 - 04-10-2017, 10:30 AM
|
User(s) browsing this thread: 1 Guest(s)