JSL Syntax Reference > JSL Messages > Namespace Messages
发布日期: 09/18/2023

Namespace Messages

ns<<Contains(string)

Returns 1 or 0, depending on whether the specified quoted string exists within the namespace.

ns<<Delete Namespace

Removes this namespace from the internal global list.

To delete variables in the namespace, use the Remove(variable name) message.

ns<<First

Returns a quoted string that contains the first variable name used within the namespace.

ns<<Get Contents

Returns a list of key-value pairs, which are each enclosed in a list. Each key is a quoted string that contains a variable name, and each value is the unevaluated expression that the variable contains.

ns<<Get Keys

Returns a list of variable names.

ns<<Get Name

Returns the name of this namespace.

ns<<Get Value(variable name);

Returns the unevaluated expression that the quoted variable name contains in this namespace.

ns<<Get Values

Returns a list of unevaluated expressions that each variable in the namespace contains.

ns<<Get Values({variable name1, variable name2, ... });

Returns a list of unevaluated expressions that each quoted variable in the namespace specified in the list argument contains. If a requested variable name is not found, an error is returned.

ns<<Insert(variable name, expr);

Inserts into this namespace a quoted variable named variable name that holds the expression expr.

ns<<Lock Namespace(<variable name, ...>)

Locks all specified variables in the namespace and prevents quotes variables from being added or removed. If no variables are specified, all variables in the namespace are locked.

ns<<N Items

Returns the number of variables contained in the namespace.

ns<<New Namespace(name, <{list of expressions}>)

Creates a namespace where all functions and variables created are defined only within the optional quoted name argument.

ns<<Next(variable name)l

Returns the name of the variable that follows the specified quoted variable.

ns<<Remove(variable name, ...)

Removes the specified quoted variable or list of variables.

ns<<Show Contents

Shows the contents of a namespace in the log.

ns<<Unlock Namespace(variable name, ...);

Unlocks the specified quoted variables in the namespace. If no variables are specified, all variables are unlocked.

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).