A qualified named reference uses the : and :: operators to provide specific information about where a referenced variable resides, or where it is created. Examples of qualified named references include the following:
:var
::globalvar
datatable:var
nsref:var
"nsname":var
An unqualified named reference provides no explicit information to completely identify where a variable resides or where it is created. No scoping operator (: or ::) is specified in the reference. To change the behavior of JMP when resolving unqualified named variable references, use the Names Default To Here(1) function. For more details about variable name resolution, see the Rules for Name Resolution.
1.
|
If the variable is followed by a pair of parentheses ( ), look it up as a function.
|
2.
|
If the variable is prefixed by : scope operator or an explicit data table reference, look it up as a data table column or table variable.
|
3.
|
If the variable is prefixed by :: scope operator, look it up as a global variable.
|
4.
|
If the variable is an explicit scope reference (such as group:vowel), look it up in the user-defined group namespace.
|
5.
|
If the variable is in a Local or Parameter function, look it up as a local variable. If it is nested, repeat until a function call boundary is found.
|
6.
|
7.
|
Look the variable up in the current scope and its parent scope. Repeat until the Here scope is encountered.
|
8.
|
Look the variable up as a variable in the Here scope.
|
10.
|
If Names Default to Here(1) is at the top of the script, stop looking. The scope is local.
|
If the variable is preceded by :: scope operator, create and use a global variable.
If Names Default to Here(0) is at the top of the script, create a global variable.