Scripting Guide > JSL Building Blocks > Global and Local Variables
발행일 : 03/10/2025

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;
더 많은 정보를 원하십니까? 질문이 있습니까? JMP 사용자 커뮤니티에서 답변 받기 (community.jmp.com).