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


x = {1, 2, b, Sqrt( 3 )};
Show( x );
x = {1, 2, b, Sqrt( 3 )};
c = Eval List( x );
N Items(::fullMonth); // returns 12 because fullMonth has 12 items.
N Items(::mlist[1]); /* returns this message: "N Items() argument must be a list" because ::mlist[1] is a variable (fullMonth) and fullMonth is a list.*/
When you add the Eval() function:
N Items( Eval( ::mlist[1] ) );
12 /* returns 12 because::mlist[1] holds ::fullMonth, and evaluating it
In a loop, you need the Eval() function in the nested loop to evaluate the variable’s contents. For example:
For( g = 1, g <= N Items( ::mlist ), g++,
For( i = 1, i <= N Items(::mlist[g]), i++,
Show( ::mlist[g][i] )
For( g = 1, g <= N Items( ::mlist ), g++,
For( i = 1, i <= N Items( Eval( ::mlist[g] ) ), i++,
Show( ::mlist[g][i] )