<?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 difference between set and new table variable - strange results in writing string? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/428036#M67738</link>
    <description>&lt;P&gt;could someone help me understand why&amp;nbsp; the 36D10 and 36E10 table variables come back expanded to sci notation? but seemingly only for 'new' instead of 'set' table variable?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Peach&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="jetpeach_0-1634588739190.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36818iA5382791969618BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jetpeach_0-1634588739190.png" alt="jetpeach_0-1634588739190.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;dt = New Table("Table");

testvar = "36D10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testD", char(testvar));

testvar = "36C10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testC", testvar);

testvar = "36F10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testF", testvar);

testvar = "36E10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testE", testvar);

testvar = "36E10";
dt &amp;lt;&amp;lt; Set Table Variable("tv_testEset", testvar);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:38:41 GMT</pubDate>
    <dc:creator>jetpeach</dc:creator>
    <dc:date>2023-06-10T23:38:41Z</dc:date>
    <item>
      <title>difference between set and new table variable - strange results in writing string?</title>
      <link>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/428036#M67738</link>
      <description>&lt;P&gt;could someone help me understand why&amp;nbsp; the 36D10 and 36E10 table variables come back expanded to sci notation? but seemingly only for 'new' instead of 'set' table variable?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Peach&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="jetpeach_0-1634588739190.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36818iA5382791969618BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jetpeach_0-1634588739190.png" alt="jetpeach_0-1634588739190.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;dt = New Table("Table");

testvar = "36D10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testD", char(testvar));

testvar = "36C10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testC", testvar);

testvar = "36F10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testF", testvar);

testvar = "36E10";
dt &amp;lt;&amp;lt; New Table Variable("tv_testE", testvar);

testvar = "36E10";
dt &amp;lt;&amp;lt; Set Table Variable("tv_testEset", testvar);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:38:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/428036#M67738</guid>
      <dc:creator>jetpeach</dc:creator>
      <dc:date>2023-06-10T23:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: difference between set and new table variable - strange results in writing string?</title>
      <link>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/429145#M67858</link>
      <description>&lt;P&gt;You could contact JMP support with this problem &lt;A href="mailto:support@jmp.com" target="_blank"&gt;support@jmp.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you get a response which will explain the behaviour, please add new comment to this topic so everyone can learn.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 04:58:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/429145#M67858</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-10-22T04:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: difference between set and new table variable - strange results in writing string?</title>
      <link>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/429212#M67868</link>
      <description>&lt;P&gt;E is for exponent and (a very long time ago) D for a double precision exponent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I recommend using &lt;EM&gt;SETTableVariable&lt;/EM&gt;; it behaves the way I'd expect: stores a number as a number and a string as a string and creates a table variable only if it isn't already there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEWTableVariable&lt;/EM&gt; adds a suffix to the name if it already exists and, (the unexpected behavior), converts strings that look like numbers to numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To further confuse things, dt&amp;lt;&amp;lt;&lt;EM&gt;GETTableVariable&lt;/EM&gt;("name") returns a string, even if the value is numeric.&lt;/P&gt;&lt;P&gt;I recommend using &lt;EM&gt;dt:name&lt;/EM&gt; to get the numeric value or the string value that is stored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;dt = New Table("Table");
dt &amp;lt;&amp;lt; new Table Variable("a", char(17)); // 17 vs char(17)
show(dt:a,dt&amp;lt;&amp;lt;gettablevariable("a"));
dt&amp;lt;&amp;lt;settablevariable("a",42.42);
show(dt:a,dt&amp;lt;&amp;lt;gettablevariable("a"));
dt&amp;lt;&amp;lt;settablevariable("a","hello");
show(dt:a,dt&amp;lt;&amp;lt;gettablevariable("a"));
dt&amp;lt;&amp;lt;settablevariable("a",42.42);
show(dt:a,dt&amp;lt;&amp;lt;gettablevariable("a"));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;dt:a = 17; &amp;lt;&amp;lt;&amp;lt; converted to a number&lt;BR /&gt;dt &amp;lt;&amp;lt; gettablevariable("a") = "17"; &amp;lt;&amp;lt;&amp;lt; but fetched as a string !?!?!&lt;BR /&gt;dt:a = 42.42; &amp;lt;&amp;lt;&amp;lt; stored a number as expected&lt;BR /&gt;dt &amp;lt;&amp;lt; gettablevariable("a") = "42.42"; &amp;lt;&amp;lt;&amp;lt; ?!?!? always returns a string&lt;BR /&gt;dt:a = "hello"; &amp;lt;&amp;lt;&amp;lt; stored a string as expected&lt;BR /&gt;dt &amp;lt;&amp;lt; gettablevariable("a") = "hello"; &amp;lt;&amp;lt;&amp;lt; well, ok&lt;BR /&gt;dt:a = 42.42;&lt;BR /&gt;dt &amp;lt;&amp;lt; gettablevariable("a") = "42.42";&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 10:59:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/429212#M67868</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-10-22T10:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: difference between set and new table variable - strange results in writing string?</title>
      <link>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/429423#M67893</link>
      <description>&lt;P&gt;Thanks Craige, that helps clarify and establish how I should use.&lt;/P&gt;&lt;P&gt;Might be nice for something to be added to documentation, or perhaps the implementations of each changed in a future JMP version so they are consistent- it seems pretty hard for a user to know the differences in behavior with the current documentation (and the 'E' I immediately did think, 'oh it's doing something w/exponent - but the 'D' causing an issue really threw me for a loop).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 19:38:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/difference-between-set-and-new-table-variable-strange-results-in/m-p/429423#M67893</guid>
      <dc:creator>jetpeach</dc:creator>
      <dc:date>2021-10-22T19:38:53Z</dc:date>
    </item>
  </channel>
</rss>

