<?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: How do I increment a loop using hexadecimal format? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/755147#M93766</link>
    <description>&lt;P&gt;Thank Craige!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-05-17_18-04-34.png" style="width: 404px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/64343i5E8DF0FCF0AA92CB/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-05-17_18-04-34.png" alt="2024-05-17_18-04-34.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2024 10:06:51 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2024-05-17T10:06:51Z</dc:date>
    <item>
      <title>How do I increment a loop using hexadecimal format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754834#M93720</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a list and populate it with the following entries: AB63, AB64,... AB79, AC63,...AZ79.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I have not been able to figure out how to increment hexadecimally ("J" = Hex(4A) ,etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, for the letters J-O (Hex4A - Hex4F), I created separate loops, which is very cumbersome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know of a way to increment hexadecimally, so I can keep this all within one loop?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;JMP17&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Loop rows AB-AI; loop columns 63-79
// A = ASCII (41)
// I = ASCII (49)
For( firstChar = 41, firstChar &amp;lt; 42, firstChar++, 
	For( secondChar = 41, secondChar &amp;lt; 50, secondChar++, 
		For( number = 63, number &amp;lt; 80, number++, 
			// Build the list element
			firstCharVal = Hex To Char( Char( firstChar ) );
			secondCharVal = Hex To Char( Char( secondChar ) );
			dataList[listIndex] = firstCharVal || secondCharVal || Char( number );
			// Increase the index
			listIndex++;
		);
	);
);

// Loop row AJ; loop columns 63-79
// J = ASCII (4A)
For( firstChar = 41, firstChar &amp;lt; 42, firstChar++, 
		For( number = 63, number &amp;lt; 80, number++, 
			// Build the list element
			firstCharVal = Hex To Char( Char( firstChar ) );
			dataList[listIndex] = firstCharVal || Hex To Char( "4A" ) || Char( number );
			// Increase the index
			listIndex++;
		);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 May 2024 22:57:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754834#M93720</guid>
      <dc:creator>kjdoran</dc:creator>
      <dc:date>2024-05-15T22:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I increment a loop using hexadecimal format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754846#M93721</link>
      <description>&lt;P&gt;You might have a look at the For Each() loop structure. &amp;nbsp;It has a much more flexible indexing structure.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 01:29:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754846#M93721</guid>
      <dc:creator>MikeD_Anderson</dc:creator>
      <dc:date>2024-05-16T01:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I increment a loop using hexadecimal format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754876#M93722</link>
      <description>&lt;P&gt;good call on ForEach!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;first = {"A", "B"};
second = {"D", "E", "F"};
number = 9 :: 11;
For Each( {f}, first, //
	For Each( {s}, second, //
		For Each( {n}, number, //
			Write( Eval Insert( "\!n^f^^s^^right(char(/*6 digits of leading zeros*/1e6+n),2)^" ) )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;AD09&lt;BR /&gt;AD10&lt;BR /&gt;AD11&lt;BR /&gt;AE09&lt;BR /&gt;AE10&lt;BR /&gt;AE11&lt;BR /&gt;AF09&lt;BR /&gt;AF10&lt;BR /&gt;AF11&lt;BR /&gt;BD09&lt;BR /&gt;BD10&lt;BR /&gt;BD11&lt;BR /&gt;BE09&lt;BR /&gt;BE10&lt;BR /&gt;BE11&lt;BR /&gt;BF09&lt;BR /&gt;BF10&lt;BR /&gt;BF11&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 01:57:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754876#M93722</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-05-16T01:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I increment a loop using hexadecimal format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754975#M93738</link>
      <description>&lt;P&gt;Craige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wow, thank you very much.&amp;nbsp; I will spend some more time with understanding the "Write" line.&amp;nbsp; I appreciate your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 15:55:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/754975#M93738</guid>
      <dc:creator>kjdoran</dc:creator>
      <dc:date>2024-05-16T15:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I increment a loop using hexadecimal format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/755030#M93743</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;txt="hex";first = {"A", "B"};
second = {"D", "E", "F"};
number = 9 :: 11;
For Each( {f}, first, //
	For Each( {s}, second, //
		For Each( {n}, number, //
			txt=txt||( Eval Insert( "\!n^f^^s^^right(char(1e6+n),2)^" ) )
		)
	)
);
d1=Open( Char To Blob(txt), "text" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;All to Craige! Learned it.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 23:25:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/755030#M93743</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-05-16T23:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I increment a loop using hexadecimal format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/755127#M93760</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17251"&gt;@lala&lt;/a&gt;&amp;nbsp; - interesting example. Explanation: the open function usually uses a filename for its first parameter, but can take a blob parameter of the actual data, which requires a second parameter since there is no file extension. "text" means interpret the data as a text file, which means a CSV-like file. This CSV has one value per line and no commas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 09:24:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/755127#M93760</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-05-17T09:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I increment a loop using hexadecimal format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/755147#M93766</link>
      <description>&lt;P&gt;Thank Craige!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-05-17_18-04-34.png" style="width: 404px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/64343i5E8DF0FCF0AA92CB/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-05-17_18-04-34.png" alt="2024-05-17_18-04-34.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 10:06:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-increment-a-loop-using-hexadecimal-format/m-p/755147#M93766</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-05-17T10:06:51Z</dc:date>
    </item>
  </channel>
</rss>

