Global vs Local behaviour
|
05-04-2015, 01:47 PM
(This post was last modified: 05-04-2015 02:56 PM by DrD.)
Post: #10
|
|||
|
|||
RE: Global vs Local behaviour
Yes, good catch... I didn't see that. That will help in sorting things out the next time this kind of thing pops up for me.
EDIT: I've learned that there are three activities that impact the contents of a global variable: 1. Command line, creates the User Variable: stg:="Stuff" 2. Compile time, re-creates the str.stg which is the same as User.stg (stg and str.stg both become 0.00 reals) 3. Run time, creates a local variable whose contents vanish after program ends. Contents from the (refreshed) command line remain intact: stg="Stuff" ==> run program, input "Junk" ==> returns "Junk" ==> stg="Stuff" and str.stg="Stuff" (No difference between User var and qualified var.) So a user would need to remember that a global value is only good if established AFTER a program has been compiled, or in other words, a global value will be destroyed if its further use in a program will undergo compiling. This is the way it works in my emulator instance, anyway. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Global vs Local behaviour - DrD - 05-02-2015, 03:24 PM
RE: Global vs Local behaviour - kharpster - 05-02-2015, 08:38 PM
RE: Global vs Local behaviour - DrD - 05-02-2015, 09:56 PM
RE: Global vs Local behaviour - kharpster - 05-02-2015, 10:29 PM
RE: Global vs Local behaviour - DrD - 05-03-2015, 02:18 AM
RE: Global vs Local behaviour - kharpster - 05-03-2015, 08:33 PM
RE: Global vs Local behaviour - cyrille de brébisson - 05-04-2015, 04:41 AM
RE: Global vs Local behaviour - DrD - 05-04-2015, 11:34 AM
RE: Global vs Local behaviour - Didier Lachieze - 05-04-2015, 01:32 PM
RE: Global vs Local behaviour - DrD - 05-04-2015 01:47 PM
RE: Global vs Local behaviour - leprechaun - 05-04-2015, 05:47 PM
|
User(s) browsing this thread: 2 Guest(s)