<?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 Loop(FOR) / basic in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Loop-FOR-basic/m-p/57922#M32207</link>
    <description>&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class="g-unit"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Dear Masters, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Nice to meet you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to double loop with the script , attached csv data but it will not be the result I think.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;The minimum value of the difference between the A column and B 1, the minimum value of the difference between the A column and B 2, the minimum value of the difference between the A column and B 3,........difference between column A and B10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to output the minimum value of the difference between column A and B until B10, but only the minimum value of difference between A1 and B1, value was "-8", is output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;--------------------------------------------------&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;db = Current Data Table();&lt;BR /&gt;temp = Column( "A" ) &amp;lt;&amp;lt; Get Values;&lt;BR /&gt;temp2 = Column( "B" )&amp;lt;&amp;lt; Get Values;&lt;BR /&gt;&lt;BR /&gt;Row = N Row( db );&lt;BR /&gt;a=0;&lt;BR /&gt;&lt;BR /&gt;For( i = 1,Row, i++,&lt;BR /&gt;a=temp[i];&lt;BR /&gt;&lt;BR /&gt;g=0&lt;BR /&gt;For( j = 1, Row, j++,&lt;BR /&gt;g = temp2[j];&lt;BR /&gt;Col Minimum(a-g );&lt;BR /&gt;);&lt;BR /&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;------------------------------------------------------&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;Thank you for your kind support.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;Uribo&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 23 May 2018 03:00:02 GMT</pubDate>
    <dc:creator>Uribo</dc:creator>
    <dc:date>2018-05-23T03:00:02Z</dc:date>
    <item>
      <title>Loop(FOR) / basic</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-FOR-basic/m-p/57922#M32207</link>
      <description>&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class="g-unit"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Dear Masters, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Nice to meet you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to double loop with the script , attached csv data but it will not be the result I think.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN&gt;The minimum value of the difference between the A column and B 1, the minimum value of the difference between the A column and B 2, the minimum value of the difference between the A column and B 3,........difference between column A and B10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to output the minimum value of the difference between column A and B until B10, but only the minimum value of difference between A1 and B1, value was "-8", is output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;--------------------------------------------------&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;db = Current Data Table();&lt;BR /&gt;temp = Column( "A" ) &amp;lt;&amp;lt; Get Values;&lt;BR /&gt;temp2 = Column( "B" )&amp;lt;&amp;lt; Get Values;&lt;BR /&gt;&lt;BR /&gt;Row = N Row( db );&lt;BR /&gt;a=0;&lt;BR /&gt;&lt;BR /&gt;For( i = 1,Row, i++,&lt;BR /&gt;a=temp[i];&lt;BR /&gt;&lt;BR /&gt;g=0&lt;BR /&gt;For( j = 1, Row, j++,&lt;BR /&gt;g = temp2[j];&lt;BR /&gt;Col Minimum(a-g );&lt;BR /&gt;);&lt;BR /&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;------------------------------------------------------&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;Thank you for your kind support.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-small"&gt;&lt;SPAN class=""&gt;Uribo&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 May 2018 03:00:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-FOR-basic/m-p/57922#M32207</guid>
      <dc:creator>Uribo</dc:creator>
      <dc:date>2018-05-23T03:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Loop(FOR) / basic</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-FOR-basic/m-p/57923#M32208</link>
      <description>&lt;P&gt;You have 2 issues of syntax.&lt;/P&gt;
&lt;P&gt;1. The For() loop requires the termination expression to be a comparison of some sort.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. You have specified a column called "A" and a memory variable called "a".&amp;nbsp; Because you did not show any scoping to indicate that the variable "a" is to be treated as a memory variable, JMP assumed you were referring to the column "A".&amp;nbsp; Remember, JMP is not case specific.&lt;/P&gt;
&lt;P&gt;Here is a corrected version of your script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;db = Current Data Table();
temp = Column( "A" ) &amp;lt;&amp;lt; Get Values;
temp2 = Column( "B" ) &amp;lt;&amp;lt; Get Values;

Row = N Row( db );
::a = 0;

For( i = 1, i &amp;lt;= Row, i++,
	::a = temp[i];

	g = 0;
	For( j = 1, j &amp;lt;= Row, j++,
		g = temp2[j];
		Col Minimum( a - g );
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 May 2018 03:17:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-FOR-basic/m-p/57923#M32208</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-05-23T03:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loop(FOR) / basic</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-FOR-basic/m-p/57924#M32209</link>
      <description>&lt;P&gt;Dear txnelson,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your quick reply, and polite commentary .&lt;/P&gt;&lt;P&gt;I was saved because the JMP script was at a loss as a novice beginner.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regars,&lt;/P&gt;&lt;P&gt;Uribo&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 05:24:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-FOR-basic/m-p/57924#M32209</guid>
      <dc:creator>Uribo</dc:creator>
      <dc:date>2018-05-23T05:24:32Z</dc:date>
    </item>
  </channel>
</rss>

