リストに複数のオブジェクト参照を格納すると、実際にはオブジェクト参照が取得されないことに気づいた人はいませんか?
例えば
Namesdefault to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder( Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y ), Smoother( X, Y ) ) );
list = {};
list2 = {};
Insert Into(list, {gb, "test", "test2"});
Insert Into(list2, gb);
show(list[1]);
show(list2[1]);
show(gb);
出力:
リスト[1] = gb;
list2[1] = グラフビルダー[];
gb = グラフビルダー[];
最初のリストは変数名を示します。呼び出しには役立ちません。
Eval List()を使用します ( スクリプト ガイド > データ構造 > JSL スクリプトのリスト > リストの評価)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Variables(X(:height), Y(:weight)),
Elements(Points(X, Y), Smoother(X, Y))
);
list = {};
list2 = {};
Insert Into(list, Eval List({gb, "test", "test2"}));