14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

210 Programming Methods Chapter 8<br />

Advanced Scoping and Namespaces<br />

Table 8.7 Namespace References a<br />

Form<br />

Reference<br />

Type<br />

Reference Rule<br />

Creation Rule<br />

a Unqualified If the Names Default To Here mode<br />

is on, JMP looks for the variable in<br />

these locations:<br />

• Local namespace b<br />

• Here namespace<br />

• current data table<br />

If the Names Default To Here mode<br />

is off, JMP looks for the variable in<br />

these locations:<br />

• Local namespace b<br />

• Here namespace<br />

• Global namespace<br />

• current data table<br />

• If the Names Default To Here<br />

mode is on, then JMP creates<br />

the variable in the Local<br />

namespace b or in the Here<br />

namespace.<br />

• If the Names Default To Here<br />

mode is off, then JMP creates<br />

the variable in the Local<br />

namespace b or in the<br />

Global namespace.<br />

:a Current<br />

data table<br />

JMP looks for the variable in the<br />

current data table.<br />

(Not applicable)<br />

::a<br />

Global:a<br />

Global<br />

JMP looks for the variable in the<br />

Global namespace.<br />

JMP creates the variable in the<br />

Global namespace.<br />

ns:a<br />

dt:a<br />

Here:a<br />

Qualified<br />

JMP looks for the variable in the<br />

specified namespace. If the variable<br />

is not found, an error results.<br />

JMP creates the variable in the<br />

specified namespace. Any<br />

previous values are replaced.<br />

"name":a<br />

expr:a<br />

ns["a"]<br />

ns[expr]<br />

Subscript<br />

JMP looks for the variable in the<br />

specified namespace. If the variable<br />

is not found, an error results.<br />

JMP creates the variable in the<br />

specified namespace. Any<br />

previous values are replaced.<br />

Platform:<br />

a<br />

Qualified<br />

JMP looks for the variable in the<br />

encapsulating platform.<br />

JMP creates the variable in the<br />

encapsulating platform.<br />

Local:a Qualified JMP looks for the variable within<br />

any nested local function, up to and<br />

including a function call boundary.<br />

See “Example of Local:a” on<br />

page 212.<br />

JMP creates the variable in the<br />

innermost nested local function<br />

or function call boundary.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!