<?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: Understanding/organizing user-defined functions in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683847#M86949</link>
    <description>&lt;P&gt;Thank you, this is what I was looking for! I was looking at several JMP references but none of them gave any details&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2023 17:56:58 GMT</pubDate>
    <dc:creator>ScottMullin</dc:creator>
    <dc:date>2023-10-04T17:56:58Z</dc:date>
    <item>
      <title>Understanding/organizing user-defined functions</title>
      <link>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683602#M86918</link>
      <description>Hi folks,&lt;BR /&gt;&lt;BR /&gt;I'm looking for examples and references to look at in the manuals as appropriate.&lt;BR /&gt;&lt;BR /&gt;I'm a longtime JMP user but have marginal experience with JSL. I'm writing a script to automate the extraction and compilation of a bunch of legacy data. I am having reasonable luck with the mechanics of each step, but my code is becoming a long series of *stuff* and I need to modularize it by writing functions and then calling those. However, I am misunderstanding how JSL works on some level. I see the "function" and "include" objects, but I'm having a hard time finding good examples of basic usage of these. For example, I made one function and put it at the end of my code, but I couldn't call it earlier in the code. I suppose that means JMP is reading the script sequentially.&lt;BR /&gt;&lt;BR /&gt;what are the proper and best practices for doing this?&lt;BR /&gt;&lt;BR /&gt;I expect this is a basic question, but any explanations are most welcome.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Scott&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Oct 2023 05:17:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683602#M86918</guid>
      <dc:creator>ScottMullin</dc:creator>
      <dc:date>2023-10-04T05:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding/organizing user-defined functions</title>
      <link>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683605#M86919</link>
      <description>&lt;P&gt;JMP Scripting Guide can provide some guidelines (or at least tell what Include and Function do)&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/advanced-functions.shtml#" target="_blank"&gt;Advanced Functions (jmp.com)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/include-a-script.shtml#ww306193" target="_blank"&gt;Include a Script (jmp.com)&lt;/A&gt;&amp;nbsp;(can be used to evaluate JSL from other scripts, for example functions which can then be used)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Functions, expressions, variables (and everything) has to be defined before they can be used. Generally I define all my functions and some of my variables at "initialization" so at the beginning of script. Remember to start your script with Names Default To Here(1); unless you manage everything with namespaces to avoid variable collisions and polluting global namespace too much (&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/advanced-scoping-and-namespaces.shtml#ww438526" target="_blank"&gt;Advanced Scoping and Namespaces (jmp.com)&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 05:45:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683605#M86919</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-04T05:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding/organizing user-defined functions</title>
      <link>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683625#M86921</link>
      <description>&lt;P&gt;Also this topic will be somewhat covered today in&amp;nbsp;&lt;A href="https://www.jmp.com/en_gb/events/users-groups/users-group-meetings/join-the-sessions-to-learn-and-leverage-the-jmp-scripting-language.html" target="_blank"&gt;Scripters Club Learning Sessions | JMP&lt;/A&gt;&amp;nbsp;(Making your JSL more Efficient).&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 06:53:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683625#M86921</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-10-04T06:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding/organizing user-defined functions</title>
      <link>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683847#M86949</link>
      <description>&lt;P&gt;Thank you, this is what I was looking for! I was looking at several JMP references but none of them gave any details&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 17:56:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Understanding-organizing-user-defined-functions/m-p/683847#M86949</guid>
      <dc:creator>ScottMullin</dc:creator>
      <dc:date>2023-10-04T17:56:58Z</dc:date>
    </item>
  </channel>
</rss>

