<?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 User Defined Functions with Expression arguments in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/User-Defined-Functions-with-Expression-arguments/m-p/652319#M84231</link>
    <description>&lt;P&gt;In JSL there are many functions which allow Expressions as arguments, like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "X", Formula( row() ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where the supplementary argument&amp;nbsp;&lt;CODE class=" language-jsl"&gt;Formula( row() )&lt;/CODE&gt;&amp;nbsp;&lt;SPAN&gt;can be at any position (N&amp;gt;1) within (...) because it can be identified via the keyword&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Formula().&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can user-defined functions have similar supplementary arguments?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 25 Jun 2023 06:59:40 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2023-06-25T06:59:40Z</dc:date>
    <item>
      <title>User Defined Functions with Expression arguments</title>
      <link>https://community.jmp.com/t5/Discussions/User-Defined-Functions-with-Expression-arguments/m-p/652319#M84231</link>
      <description>&lt;P&gt;In JSL there are many functions which allow Expressions as arguments, like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "X", Formula( row() ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where the supplementary argument&amp;nbsp;&lt;CODE class=" language-jsl"&gt;Formula( row() )&lt;/CODE&gt;&amp;nbsp;&lt;SPAN&gt;can be at any position (N&amp;gt;1) within (...) because it can be identified via the keyword&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Formula().&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can user-defined functions have similar supplementary arguments?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 06:59:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Defined-Functions-with-Expression-arguments/m-p/652319#M84231</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-25T06:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: User Defined Functions with Expression arguments</title>
      <link>https://community.jmp.com/t5/Discussions/User-Defined-Functions-with-Expression-arguments/m-p/652322#M84232</link>
      <description>&lt;P&gt;No. The user defined function always evaluates the arguments that were passed before putting the values into its local parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use expr(), but a list is a better choice: myfunc( "X", { formula( row() ) } ). I used that somewhere recently, and it worked well; variables inside the list still need to be evaluated, and myfunc finds them in the proper calling context. (Assuming no collisions between the caller names and myfunc names...) I think I used a single list and took advantage of nitems() as well.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2023 22:35:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Defined-Functions-with-Expression-arguments/m-p/652322#M84232</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-06-24T22:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: User Defined Functions with Expression arguments</title>
      <link>https://community.jmp.com/t5/Discussions/User-Defined-Functions-with-Expression-arguments/m-p/652358#M84235</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;, the workaround with the list - brilliant :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hm, worth to write a post for the wish list?&lt;/P&gt;&lt;P&gt;Ah, there is one:&lt;BR /&gt;&lt;LI-MESSAGE title="Keyword arguments for functions" uid="202431" url="https://community.jmp.com/t5/JMP-Wish-List/Keyword-arguments-for-functions/m-p/202431#U202431" 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;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:35:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/User-Defined-Functions-with-Expression-arguments/m-p/652358#M84235</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-26T20:35:17Z</dc:date>
    </item>
  </channel>
</rss>

