Global vs Local behaviour
|
05-02-2015, 09:56 PM
Post: #3
|
|||
|
|||
RE: Global vs Local behaviour
Please see the "EXPORT" function description in the help file, regarding declaration of globals.
If the global's contents are modified within the program, i.e, then the global's modified contents should be available for other usage once the program has terminated. In the second example (command line input) the global is ignored, since a (new) local variable received the activity, and vanished on exit, with the original global retaining its previous value. I suppose either approach is valid, but there are instances where it would be nice to directly effect the global with the command line input. I was thinking it would be a useful idea to have the command line input check for the existence of the variable in use (thus it would have been a global), before creating the new local variable. I'm not sure others would agree, and was wondering what the sentiment would be, if any. |
|||
« 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: 3 Guest(s)