<?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: Saved Module/Function in PROC IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832741#M5859</link>
    <description>&lt;P&gt;You cannot define two modules that have the same name and different parameters. The second definition will overwrite the first.&amp;nbsp; Or if you use the LOAD statement, the module that is stored will overwrite the current definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use define a module to have optional arguments that take on default values when they are not specified. For example,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* return 1 if x[i] is within eps of y[i] for all i */
start IsEqual(x, y, eps=1e-6);
   return( all( abs(x-y)&amp;lt;=eps) );  
finish;
 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;You can call the module as&lt;/P&gt;
&lt;P&gt;b&amp;nbsp;= IsEqual(x, y); /* Default: compare within 1e-6 */&lt;/P&gt;
&lt;P&gt;or you can specify the third argument as follows:&lt;BR /&gt;b2 = IsEqual(x, y, 1e-12); /* compare within 1e-12 */&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;For more information on default and optional arguments in SAS/IML modules, see the section "Optional parameters and default values" in the article &lt;A href="https://blogs.sas.com/content/iml/2015/06/17/everything-about-modules.html" target="_self"&gt;"Everything you wanted to know about writing SAS/IML modules."&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Sep 2022 10:38:51 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2022-09-11T10:38:51Z</dc:date>
    <item>
      <title>Saved Module/Function in PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832731#M5857</link>
      <description>&lt;P&gt;Inside of PROC IML, function/module can be stored and loaded. But one quest, what if two function with identical&lt;/P&gt;
&lt;P&gt;name but with different set of parameters, does that cause problem?! Must take changed name to differentialize&amp;nbsp;&lt;/P&gt;
&lt;P&gt;them or any other way out?!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="literallayout"&gt;store module=mymod1;            /* store module MYMOD1          */&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class="AAcommand"&gt;LOAD MODULE=&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;(modules) ;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 08:43:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832731#M5857</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-09-11T08:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Saved Module/Function in PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832739#M5858</link>
      <description>Why not post it at IML forum ? &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; is there.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/bd-p/sas_iml" target="_blank"&gt;https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/bd-p/sas_iml&lt;/A&gt;</description>
      <pubDate>Sun, 11 Sep 2022 10:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832739#M5858</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-09-11T10:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Saved Module/Function in PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832741#M5859</link>
      <description>&lt;P&gt;You cannot define two modules that have the same name and different parameters. The second definition will overwrite the first.&amp;nbsp; Or if you use the LOAD statement, the module that is stored will overwrite the current definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use define a module to have optional arguments that take on default values when they are not specified. For example,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* return 1 if x[i] is within eps of y[i] for all i */
start IsEqual(x, y, eps=1e-6);
   return( all( abs(x-y)&amp;lt;=eps) );  
finish;
 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;You can call the module as&lt;/P&gt;
&lt;P&gt;b&amp;nbsp;= IsEqual(x, y); /* Default: compare within 1e-6 */&lt;/P&gt;
&lt;P&gt;or you can specify the third argument as follows:&lt;BR /&gt;b2 = IsEqual(x, y, 1e-12); /* compare within 1e-12 */&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;For more information on default and optional arguments in SAS/IML modules, see the section "Optional parameters and default values" in the article &lt;A href="https://blogs.sas.com/content/iml/2015/06/17/everything-about-modules.html" target="_self"&gt;"Everything you wanted to know about writing SAS/IML modules."&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 10:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832741#M5859</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-09-11T10:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Saved Module/Function in PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832747#M5862</link>
      <description>ok</description>
      <pubDate>Sun, 11 Sep 2022 12:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Saved-Module-Function-in-PROC-IML/m-p/832747#M5862</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-09-11T12:26:17Z</dc:date>
    </item>
  </channel>
</rss>

