回复:如何检查是否设置了首选项以及如何设置返回值是设置首选项的命令是眼下。
您可以将命令转换为字符串,解析它并检查该选项是启用还是禁用:
returnedString=Char(Get Platform Preference( Control chart builder( K sigma ) ));
Regex(returnedString,"(on|off)","\1")
回复:如何检查是否设置了首选项以及如何设置谢谢@hogi ,效果很好。 我很生气,因为我将首选项命令分配给了一个变量,然后转换为角色没有用。 但这是 JSL 的魔力。
returnedCommand = Get Platform Preference( Control chart builder( K sigma ) );
// this gives nothing:
show(char(returnedCommand));
returnedString=Char(Get Platform Preference( Control chart builder( K sigma ) ));
// this works
show (returnedString);
回复:如何检查是否设置了首选项以及如何设置您不能也将文字检查为表达式吗?
Names default to here(1);
Get Platform Preference( Control chart builder( K sigma ) ) == Expr(Platform Preferences( Control chart builder( K Sigma( 3, <<OFF></OFF>
如何检查是否设置了首选项以及如何设置我想检查首选项是否设置为某个值,但使用 JSL,我无法检索该值以在 if 语句等中进行比较并根据情况做出反应。 获取首选项会返回一些内容,但它到底是什么以及如何继续操作呢?
Names Default To Here( 1 );
// Task: what is the preference set to
prefs = Get Platform Preference( Control chart builder( K sigma ) );
// hover over prefs shows the result correctly, but how to retrieve it,
// e.g. as a string?
// what type is this? JMP gives no answer
Type( prefs );
// it has a length
length(prefs);
// this does not work
Log Capture( Get Platform Preference( Control chart builder( K sigma ) ) );
高级统计建模自动化和脚本编写消费者和市场研究大规模定制