<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Additional Statements in Procedures</title>
    <link>http://www.mapleprimes.com/questions/143678-Additional-Statements-In-Procedures</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 15:08:25 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 15:08:25 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Additional Statements in Procedures</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Additional Statements in Procedures</title>
      <link>http://www.mapleprimes.com/questions/143678-Additional-Statements-In-Procedures</link>
    </image>
    <item>
      <title>'else'</title>
      <link>http://www.mapleprimes.com/questions/143678-Additional-Statements-In-Procedures?ref=Feed:MaplePrimes:Additional Statements in Procedures:Comments#answer143680</link>
      <itunes:summary>&lt;p&gt;You may want to use 'else' as last statement. I even type it always before writing 'end if' in any case - before filling the body, just as a frame.&lt;/p&gt;
&lt;p&gt;For clarity I prefer a 'return' in the if-branches (not needed), it depends on the 'language' you use and not all programming languages behave the same way on constructions.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You may want to use 'else' as last statement. I even type it always before writing 'end if' in any case - before filling the body, just as a frame.&lt;/p&gt;
&lt;p&gt;For clarity I prefer a 'return' in the if-branches (not needed), it depends on the 'language' you use and not all programming languages behave the same way on constructions.&lt;/p&gt;</description>
      <guid>143680</guid>
      <pubDate>Wed, 20 Feb 2013 02:44:03 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>Are you sure that's the exact procedure</title>
      <link>http://www.mapleprimes.com/questions/143678-Additional-Statements-In-Procedures?ref=Feed:MaplePrimes:Additional Statements in Procedures:Comments#answer143688</link>
      <itunes:summary>&lt;p&gt;Are you sure that what you posted is an exact cut-and-paste of your procedure and its execution? In particular I don't understand how your parameter declarations&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;Marks:=proc(m::nonnegative, numeric)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;could result in this exact error message:&lt;br&gt;&lt;br&gt;&lt;em&gt;Error, invalid input: Marks expects its 1st argument, m, to be of type&amp;nbsp;&lt;/em&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;em&gt;nonnegative and numeric, but received One&lt;/em&gt;&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;Are you sure that what you posted is an exact cut-and-paste of your procedure and its execution? In particular I don't understand how your parameter declarations&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;Marks:=proc(m::nonnegative, numeric)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;could result in this exact error message:&lt;br&gt;&lt;br&gt;&lt;em&gt;Error, invalid input: Marks expects its 1st argument, m, to be of type&amp;nbsp;&lt;/em&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;em&gt;nonnegative and numeric, but received One&lt;/em&gt;&lt;/pre&gt;</description>
      <guid>143688</guid>
      <pubDate>Wed, 20 Feb 2013 05:01:19 Z</pubDate>
      <itunes:author>Carl Love</itunes:author>
      <author>Carl Love</author>
    </item>
    <item>
      <title>Print vs return</title>
      <link>http://www.mapleprimes.com/questions/143678-Additional-Statements-In-Procedures?ref=Feed:MaplePrimes:Additional Statements in Procedures:Comments#comment143690</link>
      <itunes:summary>&lt;p&gt;To clarify Axel's comment. The code shown uses print, which means the value is printed but nothing (NULL, actually) is returned. &amp;nbsp;Beginning Maple programmers frequently use &lt;strong&gt;print&lt;/strong&gt;, rather than &lt;strong&gt;return&lt;/strong&gt;.&amp;nbsp;Printing has its uses, but for most things, returning the computed values is better in that it allows you do something with them, rather than just inspecting them.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;To clarify Axel's comment. The code shown uses print, which means the value is printed but nothing (NULL, actually) is returned. &amp;nbsp;Beginning Maple programmers frequently use &lt;strong&gt;print&lt;/strong&gt;, rather than &lt;strong&gt;return&lt;/strong&gt;.&amp;nbsp;Printing has its uses, but for most things, returning the computed values is better in that it allows you do something with them, rather than just inspecting them.&lt;/p&gt;</description>
      <guid>143690</guid>
      <pubDate>Wed, 20 Feb 2013 06:07:19 Z</pubDate>
      <itunes:author>Joe Riel</itunes:author>
      <author>Joe Riel</author>
    </item>
  </channel>
</rss>