Local variables - C Style
|
11-07-2015, 01:41 PM
(This post was last modified: 11-07-2015 01:45 PM by peacecalc.)
Post: #4
|
|||
|
|||
RE: Local variables - C Style
Hello alen12345,
I don't understand c++, but the scope of local variables are easy with the hp 50g. You have three places where you can store values of any kind. a) stack b) global variables c) local variables Every main program is enclosed between "<<" ">>" . If a nested pair of "<<" ">>" exist, it is the opertunity to create a local variables, have a short look: Code:
The recalling above involved the stack of course, but normally you will do something with the value, for example to feed another function, so the stack becomes empty like before. Maybe interesting for you: if you use locals in a loop and you interrupt with HALT, you can load the local variables with new values (with STO) or you can recall their values (with RCL), but you must have the local variable names in mind (good for debugging) because these names doesn't appear if you press VAR on your calc. greetings peacecalc |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Local variables - C Style - alen12345 - 11-07-2015, 09:08 AM
RE: Local variables - C Style - Han - 11-07-2015, 12:28 PM
RE: Local variables - C Style - alen12345 - 11-07-2015, 12:48 PM
RE: Local variables - C Style - peacecalc - 11-07-2015 01:41 PM
RE: Local variables - C Style - Gerson W. Barbosa - 11-07-2015, 02:06 PM
RE: Local variables - C Style - C.Ret - 11-08-2015, 02:52 PM
RE: Local variables - C Style - Thomas Klemm - 11-08-2015, 05:29 PM
RE: Local variables - C Style - peacecalc - 11-08-2015, 07:28 PM
|
User(s) browsing this thread: 2 Guest(s)