General Discussions
Code Efficiency - Scope vs Variable

What is more efficient, scope calls with more then 1 reference, or scope call to variable.
What is the system weight on scope functions.

For Example

  IF Watch(1, Scope(Root, "Run Status")\Value);
  [ 
    Value = \GetPhrase(Scope(Root, "Run Status")\DisplayValue);
  ]

OR

RunStatusVariable;

RunStatusVariable = Scope(Root, "Run Status");

  IF Watch(1, RunStatusVariable.Value);
  [ 
    Value = \GetPhrase(RunStatusVariable.DisplayValue);
  ]

or if a scope is not required does it change the out come?

  IF Watch(1, \RunStatus.Value);
  [ 
    Value = \GetPhrase(\RunStatus.DisplayValue);
  ]

OR

RunStatusVariable;

RunStatusVariable = \RunStatus;

  IF Watch(1, RunStatusVariable.Value);
  [ 
    Value = \GetPhrase(RunStatusVariable.DisplayValue);
  ]
What is more efficient, scope calls with more then 1 reference, or scope call to variable. What is the system weight on scope functions. For Example ```` IF Watch(1, Scope(Root, "Run Status")\Value); [ Value = \GetPhrase(Scope(Root, "Run Status")\DisplayValue); ] OR RunStatusVariable; RunStatusVariable = Scope(Root, "Run Status"); IF Watch(1, RunStatusVariable.Value); [ Value = \GetPhrase(RunStatusVariable.DisplayValue); ] ```` or if a scope is not required does it change the out come? ```` IF Watch(1, \RunStatus.Value); [ Value = \GetPhrase(\RunStatus.DisplayValue); ] OR RunStatusVariable; RunStatusVariable = \RunStatus; IF Watch(1, RunStatusVariable.Value); [ Value = \GetPhrase(RunStatusVariable.DisplayValue); ] ````

How Many Time Have You Read though every function, and the source debugger?

edited 1 day ago at 3:24 pm
6
0
1
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft