當我打開資料表時,我可以使用選項 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 , 可選參數而是有作為參數(如新表),這樣的事情可能會更容易。