x = 45;
Show( b );
b = 1;
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.
A variable defined within namespace.
Define Class("class name", <Base Class( "base class name", <"base class name", ...> ),> <Show( All(Boolean) ) | Show( <Members(Boolean),> <Methods(Boolean),> <Functions(Boolean)> ),> <Assignment Statements>)
Define Class(
"aa",
_init_ = Method( {} ); x = 1; m1 = Method( {a, b}, a * b )
);
•
|
When you delete a namespace that contains locked namespaces, an error appears in the log. Use the Force() argument to delete the locked namespaces.
|
•
|
With no arguments, Delete Namespaces() ignores locked namespaces.
|
Allows for multiple substitutions in place. The same operation as in Eval Insert is performed, and the result is placed into string.
Optional, named command; exits JMP without prompting to save any open files. This command is not case-sensitive, and spaces are optional.
The function as defined. If the Return() argument is specified, the expression is returned.
{var1, var2}
{var1=0, var1="a string"}
{Default Local}
The last option declares that all unscoped variables used in the function are local to the function.
String representation of the name of a defined class or a reference to an instantiated class object.
String representation of the name of a defined class or a reference to an instantiated class object.
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",
{
x = 1
}
);
nsbb = New Namespace(
"bb",
{
y = 1
}
);
lns = Get Namespace Names();
Show( lns );
nsaa << Delete;
nsbb << Delete;
nsaa = New Namespace(
"aa",
{
x = 1
}
);
nsbb = New Namespace(
"bb",
{
y = 1
}
);
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.
Causes the included script to be run its own unique namespace. When the parent and included scripts use the global namespace, include <<Names Default to Here along with <<New Context.
Resolves names to local expressions.
ns = New Namespace(
"aaa"
);
ns << Lock Namespaces;
Try( ns << Delete Namespaces, Show( exception_msg ) );
Delete Namespaces();
Try( Delete Namespaces( "aaa" ), Show( exception_msg ) );
Locks the specified symbols, which prevents them from being modified or cleared. If no symbols are provided, all global symbols are locked. If no symbols are provided and the script has the Names Default To Here mode turned on, then all local symbols are locked.
{ arg1 = val1, … } The set of expected arguments and optional initialization expressions to be passed to the method when called.
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.
Opens the log. Include the Boolean argument (1) to make the window active, even if it is already open.
Define Class(
"complex",
real = 0; imag = 0;
_init_ = Method( {a, b}, real = a; imag = b; );
Add = Method( {y}, complex( real + y:real, imag + y:imag ) );
Sub = Method( {y}, complex( real - y:real, imag - y:imag ) );
Mul = Method( {y},
complex( real * y:real - imag * y:imag, imag * y:real + real * y:imag )
);
Div = Method( {y},
t = complex( 0, 0 );
mag2 = y:Magsq();
t:real = real * y:real + imag * y:imag;
t:imag = imag * y:real + real * y:imag;
t:real = t:real / mag2;
t:imag = t:imag / mag2;
t;
);
Magsq = Method( {}, real * real + imag * imag );
Mag = Method( {}, Sqrt( real * real + imag * imag ) );
To String = Method( {}, Char( real ) || " + " || Char( imag ) || "i" )
);
cl = New Object( complex( 1, 2 ) );
Prints the values of the specified expressions to the log.
Makes a recursive call of the defining function.
Prints the name and value of each expression to the log.
Define Class(
"aa",
_init_ = Method( {} ); x = 1; m1 = Method( {a, b}, a * b )
);
Define Class(
"bb",
_init_ = Method( {} ); y = 1; m2 = Method( {a, b}, a / b )
);
Show Classes();
// Class aa
_init_ = Method( {} );
m1 = Method( {a, b}, a * b );
x = 1;
// Class bb
_init_ = Method( {} );
m2 = Method( {a, b}, a / b );
y = 1;
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" );
"invalid"
Try( Sqrt( "s" ), exception_msg );
{"Cannot convert argument to a number [or matrix]"(1, 2, "Sqrt", Sqrt/*###*/("s"))}
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.
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.