<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, parameter gymnastics</title>
    <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Sun, 14 Jun 2026 04:04:07 GMT</lastBuildDate>
    <pubDate>Sun, 14 Jun 2026 04:04:07 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, parameter gymnastics</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, parameter gymnastics</title>
      <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics</link>
    </image>
    <item>
      <title>non-matching default values</title>
      <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics?ref=Feed:MaplePrimes:parameter gymnastics:Comments#answer102453</link>
      <itunes:summary>&lt;p&gt;For newer releases of Maple you can assign a default value that is different from the declared type and use that to determine whether an argument has been passed. Here NULL might be appropriate&lt;/p&gt;
&lt;pre&gt;proc( ...&amp;nbsp; S :: symbol := NULL, L :: list := [], ... )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if S = NULL then &amp;lt;do something&amp;gt; end if;&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;For newer releases of Maple you can assign a default value that is different from the declared type and use that to determine whether an argument has been passed. Here NULL might be appropriate&lt;/p&gt;
&lt;pre&gt;proc( ...&amp;nbsp; S :: symbol := NULL, L :: list := [], ... )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if S = NULL then &amp;lt;do something&amp;gt; end if;&lt;/pre&gt;</description>
      <guid>102453</guid>
      <pubDate>Fri, 11 Mar 2011 20:40:56 Z</pubDate>
      <itunes:author>Joe Riel</itunes:author>
      <author>Joe Riel</author>
    </item>
    <item>
      <title>unassigning NULL</title>
      <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics?ref=Feed:MaplePrimes:parameter gymnastics:Comments#answer102529</link>
      <itunes:summary>&lt;p&gt;Ah, but suppose I use S in the sequel, and that the user has not specified the symbol. In that case, S should simply be used in its place, but now it's been assigned NULL. Without unassigning it, I cannot use it. However, unassign('S') obviously leads to an error. Any ideas?&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Ah, but suppose I use S in the sequel, and that the user has not specified the symbol. In that case, S should simply be used in its place, but now it's been assigned NULL. Without unassigning it, I cannot use it. However, unassign('S') obviously leads to an error. Any ideas?&lt;/p&gt;</description>
      <guid>102529</guid>
      <pubDate>Mon, 14 Mar 2011 12:06:43 Z</pubDate>
      <itunes:author>tijgertron</itunes:author>
      <author>tijgertron</author>
    </item>
    <item>
      <title>non-ambiguity</title>
      <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics?ref=Feed:MaplePrimes:parameter gymnastics:Comments#answer102530</link>
      <itunes:summary>&lt;p&gt;Even if it might be done: why should it be done?&lt;/p&gt;
&lt;p&gt;Why not simply provide to routines, say procList and procSymbol ...&lt;/p&gt;
&lt;p&gt;In that case the user sees what to use as input&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Even if it might be done: why should it be done?&lt;/p&gt;
&lt;p&gt;Why not simply provide to routines, say procList and procSymbol ...&lt;/p&gt;
&lt;p&gt;In that case the user sees what to use as input&lt;/p&gt;</description>
      <guid>102530</guid>
      <pubDate>Mon, 14 Mar 2011 13:19:12 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>ease of use</title>
      <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics?ref=Feed:MaplePrimes:parameter gymnastics:Comments#answer102531</link>
      <itunes:summary>&lt;p&gt;Because then it would just be a required parameter, and I want to remove as much of the complexity of the application as possible. More 'advanced' users might want to give their own symbols to certain parameters, but maybe not the average user.&lt;/p&gt;
&lt;p&gt;Apart from that, though, there is the problem that the user is only allowed to specify one, because they cannot be used both at the same time in the procedure. Trying to specify both should give an error but when I have them both as ordered required parameters then it seems rather silly to produce an error.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Because then it would just be a required parameter, and I want to remove as much of the complexity of the application as possible. More 'advanced' users might want to give their own symbols to certain parameters, but maybe not the average user.&lt;/p&gt;
&lt;p&gt;Apart from that, though, there is the problem that the user is only allowed to specify one, because they cannot be used both at the same time in the procedure. Trying to specify both should give an error but when I have them both as ordered required parameters then it seems rather silly to produce an error.&lt;/p&gt;</description>
      <guid>102531</guid>
      <pubDate>Mon, 14 Mar 2011 13:56:26 Z</pubDate>
      <itunes:author>tijgertron</itunes:author>
      <author>tijgertron</author>
    </item>
    <item>
      <title>solution</title>
      <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics?ref=Feed:MaplePrimes:parameter gymnastics:Comments#answer102533</link>
      <itunes:summary>&lt;p&gt;Of course I can create an if-then procedure, where I handle all cases separately, even though that means repeating some of the code. It's not very fancy, but it gets the job done.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Of course I can create an if-then procedure, where I handle all cases separately, even though that means repeating some of the code. It's not very fancy, but it gets the job done.&lt;/p&gt;</description>
      <guid>102533</guid>
      <pubDate>Mon, 14 Mar 2011 16:18:23 Z</pubDate>
      <itunes:author>tijgertron</itunes:author>
      <author>tijgertron</author>
    </item>
    <item>
      <title>suggestion</title>
      <link>http://www.mapleprimes.com/questions/102445-Parameter-Gymnastics?ref=Feed:MaplePrimes:parameter gymnastics:Comments#answer102536</link>
      <itunes:summary>&lt;p&gt;Is this what you want:&lt;/p&gt;
&lt;pre&gt;proc( ...&amp;nbsp; S :: symbol := ':-S', L :: list := [], ... )&lt;br&gt;...&lt;br&gt;end proc&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;Is this what you want:&lt;/p&gt;
&lt;pre&gt;proc( ...&amp;nbsp; S :: symbol := ':-S', L :: list := [], ... )&lt;br&gt;...&lt;br&gt;end proc&lt;/pre&gt;</description>
      <guid>102536</guid>
      <pubDate>Mon, 14 Mar 2011 18:31:42 Z</pubDate>
      <itunes:author>Joe Riel</itunes:author>
      <author>Joe Riel</author>
    </item>
  </channel>
</rss>