This version of the Help is no longer updated. See JMP.com/help for the latest version.

.
Scripting Guide > Programming Methods > Advanced Scoping and Namespaces > Resolving Named Variable References
Publication date: 07/30/2020

Resolving Named Variable References

When variables are referenced within a JMP script, JMP resolves the storage location of the variable using a specific set of rules. If the variable is referenced by a qualified name, then the resolution is based on the specific qualification specification. If the variable is referenced by an unqualified name, the situation is a bit more complex. JMP looks through a hierarchy of scopes representing the point of execution with the executing script. This section describes the rules that are used to resolve named variable references.

By default, variable name resolution in JMP 9 and later worked the same way as in JMP 8 and earlier, allowing your current JSL scripts to be executed unchanged. For JMP 9 and later, the difference between qualified and unqualified variable named references is important to understand.

Qualified Named References

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

Unqualified Named References

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 information about variable name resolution, see the Rules for Name Resolution in the JSL Building Blocks section.

Rules for Resolving Variable References

JMP applies rules in sequence to resolve variable references. See Rules for Resolving Names in the JSL Building Blocks section.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).