<?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: USER defined functions: Check if the function exists/loaded after Include in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218697#M43778</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

user_func = Function( {}, Print( "I'm Here!" ) );
func_name = "user_func";

Show( Is Empty( Parse( func_name || "()" ) ) ); &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Jul 2019 19:24:45 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2019-07-24T19:24:45Z</dc:date>
    <item>
      <title>USER defined functions: Check if the function exists/loaded after Include</title>
      <link>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218409#M43693</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to figure out a way to check if a user defined function exists before calling it. Is there a way to do this check in JMP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eg:&amp;nbsp;&lt;/P&gt;&lt;P&gt;user_func.jsl:&lt;/P&gt;&lt;P&gt;user_func = Function ({},{},&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Main.jsl:&lt;/P&gt;&lt;P&gt;Include("C:\Documents\user_func.jsl")&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;down in the code&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;??How to check if user_func exists??&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 18:41:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218409#M43693</guid>
      <dc:creator>dileepkr</dc:creator>
      <dc:date>2019-07-22T18:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: USER defined functions: Check if the function exists/loaded after Include</title>
      <link>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218420#M43695</link>
      <description>&lt;P&gt;You can use the IsEmpty() function.&amp;nbsp; See the example below;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;FONT face="Menlo,Monaco,Consolas,&amp;quot;Courier New&amp;quot;,monospace" size="2" style="background-color: #f5f5f5;"&gt;Clear Symbols();&lt;BR /&gt;Show( Is Empty( user_func ) );&lt;BR /&gt;user_func = Function( {}, {} );&lt;BR /&gt;Show( Is Empty( user_func ) );&lt;/FONT&gt;clear symbols();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 19:14:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218420#M43695</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-07-22T19:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: USER defined functions: Check if the function exists/loaded after Include</title>
      <link>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218421#M43696</link>
      <description>That worked, thank you very much !</description>
      <pubDate>Mon, 22 Jul 2019 19:23:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218421#M43696</guid>
      <dc:creator>dileepkr</dc:creator>
      <dc:date>2019-07-22T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: USER defined functions: Check if the function exists/loaded after Include</title>
      <link>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218695#M43776</link>
      <description>&lt;P&gt;Hi Jim &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In another case, what to do if the function name is stored as a string in a variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Clear Symbols();&lt;BR /&gt;
user_func = Function( {}, {} );
&lt;BR /&gt;func_name = "user_func";&lt;BR /&gt;&lt;BR /&gt;Show( Is Empty( Parse(func_name) ) ); //This doesnt work, any alternatives???
&lt;BR /&gt;Clear Symbols();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 19:08:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218695#M43776</guid>
      <dc:creator>dileepkr</dc:creator>
      <dc:date>2019-07-24T19:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: USER defined functions: Check if the function exists/loaded after Include</title>
      <link>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218696#M43777</link>
      <description>&lt;P&gt;Here is how I would handle that case&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;func_name = "user_func";eval(parse("Show( Is Empty( " || func_name || ") ) ;"));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jul 2019 19:16:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218696#M43777</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-07-24T19:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: USER defined functions: Check if the function exists/loaded after Include</title>
      <link>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218697#M43778</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

user_func = Function( {}, Print( "I'm Here!" ) );
func_name = "user_func";

Show( Is Empty( Parse( func_name || "()" ) ) ); &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jul 2019 19:24:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/USER-defined-functions-Check-if-the-function-exists-loaded-after/m-p/218697#M43778</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-07-24T19:24:45Z</dc:date>
    </item>
  </channel>
</rss>

