<?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 Re: Insert() Not Functioning as Hoped in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395197#M64582</link>
    <description>&lt;P&gt;The &lt;A href="https://www.jmp.com/support/help/en/16.0/index.shtml#page/jmp/list-operators-and-functions.shtml#ww309457" target="_self"&gt;documentation for List Operators and Functions&lt;/A&gt; is useful here.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE class="Format_A" summary="" width="963px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="62px"&gt;
&lt;P class="codeSyntax"&gt;Insert Into()&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="98.984375px"&gt;
&lt;P class="codeSyntax"&gt;Insert Into(&lt;SPAN class="argument"&gt;list&lt;/SPAN&gt;, &lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;, &amp;lt;&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;&amp;gt;)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="801.03125px"&gt;
&lt;P class="body"&gt;Inserts a new item (&lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;) into the &lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; at the given position (&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;). If &lt;SPAN class="argument"&gt;i&lt;/SPAN&gt; is not given, the item is added to the end of the list. This function does change the original list.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="62px"&gt;
&lt;P class="codeSyntax"&gt;Insert()&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="98.984375px"&gt;
&lt;P class="codeSyntax"&gt;&lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; = Insert(&lt;SPAN class="argument"&gt;list&lt;/SPAN&gt;, &lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;, &amp;lt;&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;&amp;gt;)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="801.03125px"&gt;
&lt;P class="body"&gt;Returns a copy of the &lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; with a new item (&lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;) inserted into the &lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; at the given position (&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;). If &lt;SPAN class="argument"&gt;i&lt;/SPAN&gt; is not given, the item is added to the end of the list. This function does not change the original list.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 17:51:22 GMT</pubDate>
    <dc:creator>Jeff_Perkinson</dc:creator>
    <dc:date>2021-06-22T17:51:22Z</dc:date>
    <item>
      <title>Insert() Not Functioning as Hoped</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395169#M64579</link>
      <description>&lt;P&gt;I'm using Insert() as indicated in the Scripting Index,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Insert(list, stuff, &amp;lt;optional index&amp;gt;);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm excluding the optional index in my case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To test my code, I created a dummy variable, temp, initiated it with&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;temp = {};&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then every iteration of my for loop (where other things work and I'm sure it is basically structured correctly--though I realize that is a vague statement and possibly has some holes in it) I add the result of an output variable to temp. Outside after the for loop I Write() temp. The result is an empty list, {}.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know why Insert() isn't working, even in "test mode".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for being such an accommodating community. I realize I throw a lot of errors your way.&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:50:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395169#M64579</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2023-06-09T19:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Insert() Not Functioning as Hoped</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395179#M64580</link>
      <description>A quick guess is that you really want to use&lt;BR /&gt;     Insert Into()</description>
      <pubDate>Tue, 22 Jun 2021 17:33:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395179#M64580</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-06-22T17:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Insert() Not Functioning as Hoped</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395186#M64581</link>
      <description>Thank you muchly, &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;, I don't know why that works but it does. JMP is such a strange language to me, coming from Python.&lt;BR /&gt;&lt;BR /&gt;=)&lt;/img&gt;</description>
      <pubDate>Tue, 22 Jun 2021 17:39:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395186#M64581</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2021-06-22T17:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Insert() Not Functioning as Hoped</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395197#M64582</link>
      <description>&lt;P&gt;The &lt;A href="https://www.jmp.com/support/help/en/16.0/index.shtml#page/jmp/list-operators-and-functions.shtml#ww309457" target="_self"&gt;documentation for List Operators and Functions&lt;/A&gt; is useful here.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE class="Format_A" summary="" width="963px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="62px"&gt;
&lt;P class="codeSyntax"&gt;Insert Into()&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="98.984375px"&gt;
&lt;P class="codeSyntax"&gt;Insert Into(&lt;SPAN class="argument"&gt;list&lt;/SPAN&gt;, &lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;, &amp;lt;&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;&amp;gt;)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="801.03125px"&gt;
&lt;P class="body"&gt;Inserts a new item (&lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;) into the &lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; at the given position (&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;). If &lt;SPAN class="argument"&gt;i&lt;/SPAN&gt; is not given, the item is added to the end of the list. This function does change the original list.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="62px"&gt;
&lt;P class="codeSyntax"&gt;Insert()&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="98.984375px"&gt;
&lt;P class="codeSyntax"&gt;&lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; = Insert(&lt;SPAN class="argument"&gt;list&lt;/SPAN&gt;, &lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;, &amp;lt;&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;&amp;gt;)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="801.03125px"&gt;
&lt;P class="body"&gt;Returns a copy of the &lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; with a new item (&lt;SPAN class="argument"&gt;x&lt;/SPAN&gt;) inserted into the &lt;SPAN class="argument"&gt;list&lt;/SPAN&gt; at the given position (&lt;SPAN class="argument"&gt;i&lt;/SPAN&gt;). If &lt;SPAN class="argument"&gt;i&lt;/SPAN&gt; is not given, the item is added to the end of the list. This function does not change the original list.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 17:51:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-Not-Functioning-as-Hoped/m-p/395197#M64582</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2021-06-22T17:51:22Z</dc:date>
    </item>
  </channel>
</rss>

