<?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: Extract Expr in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777642#M95908</link>
    <description>&lt;P&gt;On the linked page I did not find further info about &lt;FONT face="courier new,courier"&gt;ExtractExpr ()&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there something you are looking answers for?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;how to make sure JMP searches for&amp;nbsp;&lt;FONT face="courier new,courier"&gt;cc&lt;/FONT&gt;&amp;nbsp;in the expression &lt;FONT face="courier new,courier"&gt;cc * d&lt;/FONT&gt;&amp;nbsp;?&lt;BR /&gt;... even if cc is used as a name for another expression, like of &lt;FONT face="courier new,courier"&gt;x^2.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Extract Expr(cc * d , cc); // -&amp;gt; cc
cc=Expr(x^2);
Extract Expr(cc * d, cc);// looks up cc = x^2 , so doesn't find cc in cc * d anymore&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;and more general:&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;A custom function ALWAYS evaluates its arguments - and via &lt;FONT face="courier new,courier"&gt;Expr()&lt;/FONT&gt; one can prevent it from doing so.&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Extract Expr&lt;/FONT&gt; ALWAYS retrieves the&amp;nbsp;&lt;SPAN&gt;unevaluated expression behind a name (if there is one)&amp;nbsp; before using it - can the user prevent it from doing so?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Platform commands often get disturbed when names are used as arguments - and &lt;FONT face="courier new,courier"&gt;Eval&lt;/FONT&gt; might fix the issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;How many categories of handling arguments are there in JSL in total?&amp;nbsp;Is there any red line behind?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 28 Sep 2025 14:57:59 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2025-09-28T14:57:59Z</dc:date>
    <item>
      <title>Extract Expr</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777106#M95826</link>
      <description>&lt;P&gt;I am a big fan of &lt;FONT face="courier new,courier"&gt;Eval(Substitute(Expr(...), Expr(..), Expr(.)))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;: )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only disadvantage: the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Expr(...), Expr(..), Expr(.)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;... which brought me to the idea of&amp;nbsp;&lt;LI-MESSAGE title="subst() - substitute() 2.0" uid="776918" url="https://community.jmp.com/t5/JMP-Wish-List/subst-substitute-2-0/m-p/776918#U776918" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; ... a function which doesn't evaluate it's arguments.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;While playing around with Expression Handling, I noticed that the desired logic for &lt;FONT face="courier new,courier"&gt;Subst()&lt;/FONT&gt; is quite close to the one of &lt;FONT face="courier new,courier"&gt;Extract Expr():&amp;nbsp;&lt;/FONT&gt;no need to use &lt;FONT face="courier new,courier"&gt;Expr(),&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;Name Expr()&lt;/FONT&gt; is applied wherever it is possible:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to here(1);
// direct mode, no Expr necessary
Extract Expr(x^2 + y, x);// -&amp;gt; x
Extract Expr(x^2 + y, c);// no c in x^2 + y -&amp;gt;  empty

// Name Expr mode
c=Expr(x^2);
Extract Expr(x^2 + y , c);// looks up c = x^2, find "x^2"" in x^2 +y&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Wonderful!&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;... till:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Extract Expr(cc * d , cc); // -&amp;gt; cc
cc=Expr(x^2);
Extract Expr(cc * d, cc);// looks up cc = x^2 , so doesn't find cc in cc * d anymore&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Dangerous ...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;after defining &lt;FONT face="courier new,courier"&gt;cc&lt;/FONT&gt; as a symbol with a &lt;FONT face="courier new,courier"&gt;name expr&lt;/FONT&gt;, is it still possible to use &lt;FONT face="courier new,courier"&gt;c&lt;/FONT&gt; "literally" in &lt;FONT face="courier new,courier"&gt;Extract Expr&lt;/FONT&gt; ?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Extract Expr(cc * d , Expr(cc)); // doesn't work
Extract Expr(Expr(cc) , Expr(cc)); // finds Expr(cc)
Extract Expr(cc , Name Expr(Expr(cc))); // -&amp;gt; empty
Extract Expr(Name Expr(Expr(cc)) , Name Expr(Expr(cc))); // finds Name Expr(Expr(cc)), argh!&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;even:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cc=Expr(x^2);
clear symbols(cc);
Extract Expr(cc * d , cc);&amp;nbsp;//-&amp;gt; &amp;nbsp;empty()&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2024 10:43:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777106#M95826</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-07-31T10:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Expr</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777116#M95827</link>
      <description>&lt;P&gt;maybe:&lt;/P&gt;&lt;P&gt;use a custom function as a wrapper for &lt;FONT face="courier new,courier"&gt;Extract Expr&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
dummy=Function ({expression, pattern},
Extract Expr(expression, pattern);
);

cc = Expr(x^2);
dummy( Expr(cc+d), Expr(cc)); // -&amp;gt; cc&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Jul 2024 16:46:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777116#M95827</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-07-28T16:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Expr</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777629#M95905</link>
      <description>&lt;P&gt;Is there something you are looking answers for? Also have you read Scripting Guide about expressions &lt;A href="https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/advanced-expressions-macros-and-lists.shtml#ww339382" target="_blank" rel="noopener"&gt;Scripting Guide &amp;gt; Programming Methods &amp;gt; Advanced Expressions, Macros, and Lists - Advanced Expressions&lt;/A&gt; and especially the parts how they get evaluated?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 09:24:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777629#M95905</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-31T09:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Expr</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777642#M95908</link>
      <description>&lt;P&gt;On the linked page I did not find further info about &lt;FONT face="courier new,courier"&gt;ExtractExpr ()&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there something you are looking answers for?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;how to make sure JMP searches for&amp;nbsp;&lt;FONT face="courier new,courier"&gt;cc&lt;/FONT&gt;&amp;nbsp;in the expression &lt;FONT face="courier new,courier"&gt;cc * d&lt;/FONT&gt;&amp;nbsp;?&lt;BR /&gt;... even if cc is used as a name for another expression, like of &lt;FONT face="courier new,courier"&gt;x^2.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Extract Expr(cc * d , cc); // -&amp;gt; cc
cc=Expr(x^2);
Extract Expr(cc * d, cc);// looks up cc = x^2 , so doesn't find cc in cc * d anymore&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;and more general:&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;A custom function ALWAYS evaluates its arguments - and via &lt;FONT face="courier new,courier"&gt;Expr()&lt;/FONT&gt; one can prevent it from doing so.&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Extract Expr&lt;/FONT&gt; ALWAYS retrieves the&amp;nbsp;&lt;SPAN&gt;unevaluated expression behind a name (if there is one)&amp;nbsp; before using it - can the user prevent it from doing so?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Platform commands often get disturbed when names are used as arguments - and &lt;FONT face="courier new,courier"&gt;Eval&lt;/FONT&gt; might fix the issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;How many categories of handling arguments are there in JSL in total?&amp;nbsp;Is there any red line behind?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Sep 2025 14:57:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777642#M95908</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-28T14:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Expr</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777658#M95912</link>
      <description>&lt;P&gt;Why would you use same variable name in multiple places like that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Delete Symbols() and Clear Symbols() are not same&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

cc = Expr(x ^ 2);
Delete Symbols(cc);
Extract Expr(cc * d, cc);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2024 12:29:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/777658#M95912</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-31T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Expr</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/781274#M96384</link>
      <description>&lt;P&gt;Thanks for the link.&lt;/P&gt;&lt;LI-SPOILER&gt;It looks like Extract Expr() works differently depending on how cc is defined. To use cc literally, avoid reassigning it with Expr() or use Name Expr() to manage symbols carefully and prevent evaluation issues. I was struggling with a challenging paper, so I turned to &lt;A href="https://domypaper.com/" target="_blank"&gt;https://domypaper.com/&lt;/A&gt; The service was excellent. The writer was knowledgeable, followed my instructions carefully, and delivered a well-organized, high-quality paper. The communication was smooth, and the paper was delivered on time. I’m extremely satisfied with the results and would definitely use this service again for future assignments.&lt;/LI-SPOILER&gt;</description>
      <pubDate>Sat, 24 Aug 2024 06:01:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Expr/m-p/781274#M96384</guid>
      <dc:creator>EmilyWood</dc:creator>
      <dc:date>2024-08-24T06:01:15Z</dc:date>
    </item>
  </channel>
</rss>

