ginigma Senior Member
Joined: June 18 2006 Location: United States
Online Status: Offline Posts: 127
|
Posted: February 16 2008 at 16:11 | IP Logged
|
|
|
From a previous post of Dave's:
Quote:
The distinction between [LOCAL] and [TEMP] variables have become blurred in recent versions. Originally, you had 3 types of system variables, [LOCAL], [TEMP], and [GLOBAL] (not to be confused with a database global variable...a [GLOBAL] system variable is stored in memory only). [GLOBAL] variables were easy and were just as implied...global. They could be changed and accessed anywhere. [TEMP] variables were unique to the macro or formula but could be passed down to another macro or formula...never passed up. [LOCAL] variables were unique to the particular macro or formula and every new macro or formula got a fresh set. With the advent of plugins and triggers that need to pass a lot of data, the [LOCAL] always being a fresh set has changed somewhat. Since [TEMP] variables always could be inherited, these were the variables that were used to pass data to a called macro or formula from a trigger. Recently, we need to pass more data than is available for the [TEMP] variables so macros and formulas called from triggers (or plugins) can also inherit data in [LOCAL] variables. |
|
|
I have a situation where some marcos are running simutaneously. If they are using the same variable names (meaning each macro is using [TEMP1] within its own macro) are they being stepped on? Can I safely use [LOCAL] variables which will not be stepped on? Or should I just use all different names of [GLOBAL] variables?
__________________ Insteon (40 devices) ^ PowerHome (435 links) ^ Logitech Harmony 880
|