该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


x = 45;
b = As Boolean( x > 2 );
Show( b );
This scoping operator forces name to be evaluated as a data table column in the current data table (or the table given by the optional data table reference argument, dt) rather than as a global variable.
:name refers to a column name in the current data table. You can also specify which data table to refer to by use dt:name.
A few platforms that can save prediction columns to a data table use As Constant(). The function is wrapped around the part of the formula that is constant across all rows. The argument is evaluated for the first row and then the result is used without re-evaluation for subsequent rows.
This scoping operator forces name to be evaluated as a global variable rather than as a data table column.
Accesses the specified variable within the specified namespace.
"aa",
{_init_ = Method( {} ), x = 1, m1 = Method( {a, b}, a * b )}
With no arguments, Delete Namespaces() ignores locked namespaces.
Evaluates expr, and then evaluates the result of expr (unquoting).
Allows for multiple substitutions in place. The same operation as in Eval Insert is performed, and the result is placed into string.
Stores the body script with arguments as local variables.
The function as defined. If the Return() argument is specified, the expression is returned.
When called later, it returns the result of the script given the specified arguments.
Optional, integer. If no argument is specified, all the lines are returned. If a positive number is specified, the first n lines are returned. If a negative number is specified, the last n lines are returned. If n=0, no lines are returned (an empty list). If the log is empty, an empty list is returned.
nsaa = New Namespace(
"aa",
nsbb = New Namespace(
"bb",
lns = Get Namespace Names();
Show( lns );
nsaa << Delete;
nsbb << Delete;
nsaa = New Namespace(
"aa",
nsbb = New Namespace(
"bb",
lns = Get Namespaces();
Opens the script file identified by the quoted string pathname, parses the script in it, and executes it.
Whatever the included script returns. If you use the <<Parse Only option, Include returns the contents of the script.
See “Includes” in the Scripting Guide for details about the function.
Resolves names to local expressions.
ns = New Namespace(
"aaa"
ns << Lock Namespaces;
Try( ns << Delete Namespaces, Show( exception_msg ) );
Try( Delete Namespaces( "aaa" ), Show( exception_msg ) );
Determines where unresolved names are stored, either as a global or local (if Boolean is 0) or in the Here scope (if Boolean is 1).
Returns 1 if a namespace with the specified name exists; otherwise, returns 0.
New Namespace(<"name">, <{expr, ...}>)
Opens the log. Include the Boolean argument (1) to make the window active, even if it is already open.
"complex",
{real = 0, imag = 0, _init_ = Method( {a, b},
), Add = Method( {y},
), Sub = Method( {y},
), Mul = Method( {y},
), Div = Method( {y},
), Magsq = Method( {},
), Mag = Method( {},
Sqrt( real * real + imag * imag )
), To String = Method( {},
Char( real ) || " + " || Char( imag ) || "i"
cl = New Object( complex( 1, 2 ) );
cl << Delete;
Delete Classes( "complex" );
Sends a message to a platform object.
"aa",
{_init_ = Method( {} ), x = 1, m1 = Method( {a, b}, a * b )}
"bb",
{_init_ = Method( {} ), y = 1, m2 = Method( {a, b}, a / b )}
Returns a Throw. If you include text, throwing stores text in a global exception_msg. If text begins with “!” and is inside a Try() expression, throwing creates an error message about where the exception was caught. “!” stops the script even if the Throw() is caught by the second argument of Try().
Evaluates expr1. If the evaluation returns a Throw, execution stops, and nothing is returned. expr2 is evaluated next to return the result.
Try( Sqrt( "s" ), "invalid" );
Try( Sqrt( "s" ), exception_msg );
Expr2 can be a character string or the global exception message (exception_msg) that contains more information about the error returned.
Returns a string that names the type of object x is. The list of possible types is: Unknown, List, DisplayBox, Picture, Column, TableVar, Table, Empty, Pattern, Date, Integer, Number, String, Name, Matrix, RowState, Expression, Associative Array, Blob.
Unlocks the specified symbols that were locked with a Lock Symbols() or Lock Globals() command.
Pauses n seconds before continuing the script.
Only used with Extract Expr() for expression matching to denote a wildcard position that matches any expression.
Only used with Extract Expr() for expression matching to denote a series of wildcard arguments that match any expression.
Prints text to the log without surrounding quotation marks.