<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with associative arrays and default values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Issue-with-associative-arrays-and-default-values/m-p/801948#M97788</link>
    <description>&lt;P&gt;Why is it not possible to specify an associative array as default value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;create = Function( {x},	Associative Array( {{"value", x}} )	);

create(1);
Associative Array(Eval List({ Eval List( {1, create(1)})}));   // [1 =&amp;gt; ["value" =&amp;gt; x]]
Associative Array(Eval List({ Eval List( {1, create(1)})}),2); // [1 =&amp;gt; ["value" =&amp;gt; x], =&amp;gt; 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&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1727335823514.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68599iDC5E042444F78DA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1727335823514.png" alt="hogi_0-1727335823514.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 08:09:13 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-09-26T08:09:13Z</dc:date>
    <item>
      <title>Issue with associative arrays and default values</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-with-associative-arrays-and-default-values/m-p/801948#M97788</link>
      <description>&lt;P&gt;Why is it not possible to specify an associative array as default value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;create = Function( {x},	Associative Array( {{"value", x}} )	);

create(1);
Associative Array(Eval List({ Eval List( {1, create(1)})}));   // [1 =&amp;gt; ["value" =&amp;gt; x]]
Associative Array(Eval List({ Eval List( {1, create(1)})}),2); // [1 =&amp;gt; ["value" =&amp;gt; x], =&amp;gt; 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&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1727335823514.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68599iDC5E042444F78DA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1727335823514.png" alt="hogi_0-1727335823514.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 08:09:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-with-associative-arrays-and-default-values/m-p/801948#M97788</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-09-26T08:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with associative arrays and default values</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-with-associative-arrays-and-default-values/m-p/801958#M97789</link>
      <description>&lt;P&gt;workaround:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&amp;lt;&amp;lt; Set Default Value( )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Sep 2024 07:32:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-with-associative-arrays-and-default-values/m-p/801958#M97789</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-09-26T07:32:27Z</dc:date>
    </item>
  </channel>
</rss>

