<?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 Conversion from MathCAD15 to Prime9 Variable Issue in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940611#M211016</link>
    <description>&lt;P&gt;When I ran the conversion tool it converted mathcad15 statement&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregH_0-1711982895273.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101381i272F101566FAAECA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregH_0-1711982895273.png" alt="GregH_0-1711982895273.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;to Prime 9 Statement&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="GregH_1-1711982963850.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101382iC05F719A3089DD05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregH_1-1711982963850.png" alt="GregH_1-1711982963850.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;which only works if a precede it with an additional variable definition&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregH_2-1711983031175.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101383iAF8BC4B6D7139046/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregH_2-1711983031175.png" alt="GregH_2-1711983031175.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;where NPS1 is already defined.&lt;/P&gt;&lt;P&gt;Any ideas why this additional variable statement is required for Prime9 but not Mathcad15?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 14:54:08 GMT</pubDate>
    <dc:creator>GregH</dc:creator>
    <dc:date>2024-04-01T14:54:08Z</dc:date>
    <item>
      <title>Loop Conversion from MathCAD15 to Prime9 Variable Issue</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940611#M211016</link>
      <description>&lt;P&gt;When I ran the conversion tool it converted mathcad15 statement&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregH_0-1711982895273.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101381i272F101566FAAECA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregH_0-1711982895273.png" alt="GregH_0-1711982895273.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;to Prime 9 Statement&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="GregH_1-1711982963850.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101382iC05F719A3089DD05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregH_1-1711982963850.png" alt="GregH_1-1711982963850.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;which only works if a precede it with an additional variable definition&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregH_2-1711983031175.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101383iAF8BC4B6D7139046/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregH_2-1711983031175.png" alt="GregH_2-1711983031175.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;where NPS1 is already defined.&lt;/P&gt;&lt;P&gt;Any ideas why this additional variable statement is required for Prime9 but not Mathcad15?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 14:54:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940611#M211016</guid>
      <dc:creator>GregH</dc:creator>
      <dc:date>2024-04-01T14:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Conversion from MathCAD15 to Prime9 Variable Issue</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940641#M211023</link>
      <description>&lt;P&gt;What you are trying to do is equivalent to:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LucMeekes_0-1711992211298.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101389i44989E20F6F78E37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LucMeekes_0-1711992211298.png" alt="LucMeekes_0-1711992211298.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;At the time of creation of the vector, it's element values are unknown.&lt;/P&gt;
&lt;P&gt;I guess Prime was built as an even more lazy machine than Mathcad, although, in Mathcad this doesn't work either:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LucMeekes_1-1711992364374.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101390i396BBF08E787D0FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LucMeekes_1-1711992364374.png" alt="LucMeekes_1-1711992364374.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;BR /&gt;Luc&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 17:27:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940641#M211023</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2024-04-01T17:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Conversion from MathCAD15 to Prime9 Variable Issue</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940722#M211035</link>
      <description>&lt;P&gt;Hello Luc, thanks for the review and explanation. It makes sense to me that the vector creation was the issue. They must of handled it differently in MC15 with the if/otherwise statement. When Prime 9 did the conversion it changed this throughout the program to the new if/else format.&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="GregH_0-1712020727870.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101429iE7FC570070F8BECC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregH_0-1712020727870.png" alt="GregH_0-1712020727870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 01:22:04 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940722#M211035</guid>
      <dc:creator>GregH</dc:creator>
      <dc:date>2024-04-02T01:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Conversion from MathCAD15 to Prime9 Variable Issue</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940844#M211045</link>
      <description>&lt;P&gt;If I recall correctly, Mathcad 15 first checks the condition and then calculates the appropriate fork. The other fork is not handled at all and thus the error didn't happen. Prime checks both forks and sees the error.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 10:48:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/940844#M211045</guid>
      <dc:creator>JKT</dc:creator>
      <dc:date>2024-04-02T10:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Conversion from MathCAD15 to Prime9 Variable Issue</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/941425#M211064</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/656334"&gt;@JKT&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;Prime checks both forks and sees the error.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Correct! On contrary to Mathcad, Prime does not use short-circuit evaluation (-&amp;gt; &lt;A href="https://en.wikipedia.org/wiki/Short-circuit_evaluation" target="_blank"&gt;Short-circuit evaluation - Wikipedia&lt;/A&gt;).&lt;BR /&gt;Neither for boolean expressions nor for if-statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are two different ways to create the desired vector (I assume n to be a range running from 0 to N).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1712153189577.png" style="width: 544px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/101596i274D971345A8F656/image-dimensions/544x370?v=v2" width="544" height="370" role="button" title="Werner_E_0-1712153189577.png" alt="Werner_E_0-1712153189577.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Even though the second approach is much shorter I would prefer the first one for better clarity and 'cause it does not need a range n to be defined (its replaced by the explicit internal for-loop). This for-loop allows the very same if-statement to work without an error on contrary to the usage of the range variable n (which is kind of an implicit loop).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 14:10:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Loop-Conversion-from-MathCAD15-to-Prime9-Variable-Issue/m-p/941425#M211064</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2024-04-03T14:10:11Z</dc:date>
    </item>
  </channel>
</rss>

