Global vs Local behaviour
|
05-04-2015, 01:32 PM
Post: #9
|
|||
|
|||
RE: Global vs Local behaviour
(05-04-2015 11:34 AM)DrD Wrote: I think I may have found something I hadn't noticed before, which may explain my concern being debated in this discussion. Apparently, if a variable is created via the command line, (for example and notice Type: string): Now you have created a User Variable as you can see with the Vars key: (05-04-2015 11:34 AM)DrD Wrote: and then a program using that variable name "EXPORT str(stg)" just gets COMPILED, it destroys the original value, in what I was thinking was a global variable, (compile, but don't run this yet): Now you have created another stg global variable in the str context: (05-04-2015 11:34 AM)DrD Wrote: Notice that the value of the (global?) command line variable stg gets destroyed: The latest referenced "stg" variable is the one accessed, but the original one has not been destroyed as you can retrieve it's content if you delete the str program. If you have two global variables with the same name (stg) Exported from two programs (pgm1, pgm2) you can access them as pgm1.stg and pgm2.stg, what I don't know is which qualifier you should use to access the stg User Variable. |
|||
« 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)