발행일 : 03/10/2025

Advanced Macros

Stored JSL expressions can serve as a macro feature. You can store a generalized action as an expression in a JSL variable, and then call that variable wherever you need that action to be performed. This example has four macros as the arguments to If:

lastStdzdThickness=expr(
	(thickness[nrow()]-col mean(thickness)) / col std dev(thickness));
continue=expr(...<script to read in more data>...);
log=expr(print("In control at "||char( long date(today()))));
break=expr(...<script to shut down process>...); limitvalue=1;
 
if(lastStdzdThickness<limitvalue,log;continue,break);

Storing the expression with Expr delays its evaluation until the variable is evaluated. Any variables, data points, or expressions included in that expression are evaluated on the fly when the expression is evaluated. See Advanced Expressions for detailed rules for storing expressions and later evaluating them.

더 많은 정보를 원하십니까? 질문이 있습니까? JMP 사용자 커뮤니티에서 답변 받기 (community.jmp.com).