<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, display the function behind a variable?</title>
    <link>http://www.mapleprimes.com/questions/143955-Display-The-Function-Behind-A-Variable</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 11:14:09 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 11:14:09 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, display the function behind a variable?</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, display the function behind a variable?</title>
      <link>http://www.mapleprimes.com/questions/143955-Display-The-Function-Behind-A-Variable</link>
    </image>
    <item>
      <title>eval, print, showstat</title>
      <link>http://www.mapleprimes.com/questions/143955-Display-The-Function-Behind-A-Variable?ref=Feed:MaplePrimes:display the function behind a variable?:Comments#answer143957</link>
      <itunes:summary>&lt;p&gt;One can programmatically&amp;nbsp;access the body of a procedure using the `eval` command. Eg. to subs into it, or get its inert form, or assign a copy of it to something else, etc.&lt;/p&gt;
&lt;p&gt;By default one can also use just the `print` command to display the body of a procedure. This differs from `eval` in that it only prints. The return value from this operation is NULL, so it doesn't give programmatic access. (See also &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=interface&amp;amp;term=verboseproc"&gt;?verboseproc&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To display line numbers, one can use the `showstat` command.&lt;/p&gt;
&lt;pre&gt;&amp;gt; restart:

&amp;gt; u:=x-&amp;gt;x^2;
                      
                            2
                      x -&amp;gt; x 

&amp;gt; f:=eval(u);

                            2
                      x -&amp;gt; x 

&amp;gt; f(3);

                         9

&amp;gt; print(u);

                            2
                      x -&amp;gt; x

&amp;gt; showstat(u);

u := proc(x)
   1   x^2
end proc

&lt;/pre&gt;
&lt;p&gt;Note that all of these will display without showing any comments present in the original source.&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;One can programmatically&amp;nbsp;access the body of a procedure using the `eval` command. Eg. to subs into it, or get its inert form, or assign a copy of it to something else, etc.&lt;/p&gt;
&lt;p&gt;By default one can also use just the `print` command to display the body of a procedure. This differs from `eval` in that it only prints. The return value from this operation is NULL, so it doesn't give programmatic access. (See also &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=interface&amp;amp;term=verboseproc"&gt;?verboseproc&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To display line numbers, one can use the `showstat` command.&lt;/p&gt;
&lt;pre&gt;&amp;gt; restart:

&amp;gt; u:=x-&amp;gt;x^2;
                      
                            2
                      x -&amp;gt; x 

&amp;gt; f:=eval(u);

                            2
                      x -&amp;gt; x 

&amp;gt; f(3);

                         9

&amp;gt; print(u);

                            2
                      x -&amp;gt; x

&amp;gt; showstat(u);

u := proc(x)
   1   x^2
end proc

&lt;/pre&gt;
&lt;p&gt;Note that all of these will display without showing any comments present in the original source.&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>143957</guid>
      <pubDate>Wed, 27 Feb 2013 15:08:46 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
  </channel>
</rss>