当我打开数据表时,我可以使用选项 private 来隐藏数据表:
dt = Open( "$SAMPLE_DATA/Big Class.jmp", private );
相同的功能也可用于表操作,例如子集、连接等:
Data Table( "Big Class" ) << subset(1, Private)
Data Table( "Big Class" ) << Concatenate( Data Table( "Big Class" ), Private);
对于 MFI,没有这样的选项:(
...到目前为止,社区的强烈需求是:
导入多个文件的私有选项
在我的脚本中,在调试时,我喜欢查看数据表,所以我添加了:
//developerIsHere = 1
loadPrivate = If( Is Empty( developerIsHere ),1,0); // default: 1; for debugging automatically set to 0
dt = Open( "$SAMPLE_DATA/Big Class.jmp", private(loadPrivate ) );
的想法:
As a developer, I can execute the developerIsHere = 1 behind the //
then the data table is opened with the option private(0) and I can see the data table and debug the code.
出奇,
Data Table( "Big Class" ) << subset(1, private(loadPrivate ) )
不“工作”,该表始终以私有模式打开 - 与loadPrivate的当前值无关。似乎表操作对Private的存在做出反应 - 与参数无关。
只需尝试以下命令:
current data table() << subset(1,Private(1));
current data table() << subset(1,Private(0));
current data table() << subset(1,Private("has no effect"));它们都具有相同的效果 - 子集在私有模式下打开。
嗯。
有没有一些关于私人和私人之间差异的文档?
是否有一些不那么复杂的东西,其作用与:
Eval(Substitute(Expr(current data table() << Subset( 1,__p__)),Expr(__p__),If(loadPrivate,Expr(Private),1)));
TS-00127556
➥ Jmp 和 JSL 中的微小陷阱
我认为表达混乱只是你拥有的相当简单的选择
Names Default To Here(1);
DEBUG = 1;
If(IsEmpty(DEBUG),
TABLE_VISIBILITY = "Visible";
, DEBUG == 1,
TABLE_VISIBILITY = "Private";
, // else
TABLE_VISIBILITY = "Visible";
);
dt = Eval(EvalExpr(Open("$SAMPLE_DATA/Big Class.jmp", Expr(TABLE_VISIBILITY))));
dt_subset = Eval(EvalExpr(dt << Subset(dt, Expr(TABLE_VISIBILITY))));
dt_new = New Table("MyTable", Visibility(TABLE_VISIBILITY));
Show(dt, dt_subset, dt_new);
Maybe if all the messages/functions related to table creation didn't just use , 可选参数而是有作为参数(如新表),这样的事情可能会更容易。