cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

Issue with associative arrays and default values

Why is it not possible to specify an associative array as default value?

 

create = Function( {x},	Associative Array( {{"value", x}} )	);

create(1);
Associative Array(Eval List({ Eval List( {1, create(1)})}));   // [1 => ["value" => x]]
Associative Array(Eval List({ Eval List( {1, create(1)})}),2); // [1 => ["value" => x], => 2]


Associative Array(Eval List({Eval List( {1, create(1)})}),		create( 2 )); // empty ?!?!?

//deep dive
Associative Array({ {1, 1}},create(2)); // doesn't work
Associative Array( {1}, {1},create(2)); // works

One could argue that providing the default value during the creation of the associative array is not possible - but it works in 2 out of 4 cases.

 

hogi_0-1727335823514.png

 

1 REPLY 1
hogi
Level XIII

Re: Issue with associative arrays and default values

workaround: 

<< Set Default Value( )

Recommended Articles