For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > JSL Building Blocks > Global and Local Variables
Publication date: 06/21/2023

Global and Local Variables

In JSL, variables are names that hold values, which you reference later in scripts. There are two types of variables:

Global variables are shared among all scripts that you run in a JMP session.

Local variables apply only to the script context in which you define them. They can also be local to only a piece of a script, as with variables local to a particular function.

To limit the scope of variables, you can define them in a namespace, which is a collection of variables, functions, and other unique names. JMP has a single global variable namespace that all scripts use by default. When you use a name plainly, without a qualifying syntax, the name is an unscoped variable and therefore in the global namespace.

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