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


Other inquiry functions (such as Is Matrix(), Is List(), Is Scriptable(), and so on) let you test for specific types of objects. In the following example, Is Matrix() evaluates as true, then the specified calculations are run:
a = [2 3];
b = [1, 1];
If( Is Matrix( c ),
Print( "c is not a matrix." )
Is Scriptable() returns 1 when the object is scriptable. Four variables in the following example refer to a data table, column, platform, and report. All four objects are scriptable, so Is Scriptable() returns 1 for each example.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
col = Column( "weight" );
plat = Bivariate( Y( :weight ), X( :height ) );
rep = Report( plat );
Show( Is Scriptable( dt ) );
Show( Is Scriptable( col ) );
Show( Is Scriptable( plat ) );
Show( Is Scriptable( rep ) );
Is Empty() tests to see whether a variable has a value, a function, an expression, or a reference to an object. It returns 1 if the variable is undefined or holds the Empty() value.Otherwise, you get errors when referring to something that has not been created or assigned a value yet. Programmers call this an uninitialized variable.
Here is an example of a test to see whether a data table is opened and therefore assigned to the dt variable. If a data table is not opened, the Open() function prompts the user to open the table.
If( Is Empty( dt = Current Data Table() ),
dt = Open()
You can use Is Empty() for any variable (such as global variable, local variable, and columns).
Inquiry Functions That Identify Object Types shows functions that identify object types.
Is Empty(global)