Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 4839

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>on -- trace a function each time it's run</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="___One__Expression.html">next</a> | <a href="_of__Class.html">previous</a> | <a href="___One__Expression.html">forward</a> | <a href="_of__Class.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<hr/>
<div><h1>on -- trace a function each time it's run</h1>
<div class="single"><h2>Synopsis</h2>
<ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>on f</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>f</tt>, <span>a <a href="___Function.html">function</a></span></span></li>
<li><span><tt>f</tt></span></li>
<li><span> is an anonymous function (not assigned to a global variable)</span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="___Function.html">function</a></span>, a new function that returns the same values that <tt>f</tt> would have returned, but has a few side effects useful for debugging: upon entry, it prints its arguments, and upon exit it prints its return values.  The display includes the name of <tt>f</tt>, a sequence number in parentheses that tells how many times the function has been called, and a number in brackets that gives the nesting (recursion) depth.  The sequence number allows the entry and exit reports to be connected.</span></li>
</ul>
</div>
</li>
<li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><tt>CallLimit => </tt><span><span>an <a href="___Z__Z.html">integer</a></span>, <span>default value 100000</span>, the maximum number of times to permit the function f to be called</span></span></li>
<li><span><tt>Name => </tt><span><span>a <a href="___String.html">string</a></span>, <span>default value null</span>, the name to use for the function, in case </span></span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><p>Ideally, this function would replace <tt>f</tt>, i.e., we would write <tt>f = on f</tt>.  Unfortunately, all the pre-installed system functions are write-protected.</p>
</div>
</div>
</div>
</body>
</html>