<?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>disassemble -- disassemble pseudocode or a function</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_dismiss.html">next</a> | <a href="_direct__Sum.html">previous</a> | <a href="_dismiss.html">forward</a> | <a href="_direct__Sum.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>disassemble -- disassemble pseudocode or a function</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>disassemble c</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>c</tt>, <span>an object of class <a href="___Pseudocode.html" title="the class of pseudocodes">Pseudocode</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><span>a <a href="___String.html">string</a></span>, the disassembled form of <tt>c</tt></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><table class="examples"><tr><td><pre>i1 : disassemble res o1 = (function restargs: true numparms: 1 framesize: 1 frameID: 188 (adjacent (fetch 283) (sequence (fetch 1 1) (adjacent (fetch 240) (sequence (fetch 0 1) (fetch 0 0))))))</pre> </td></tr> </table> <p>It may be useful to disassemble code during debugging, as in the following demonstration.</p> <table class="examples"><tr><td><pre>i2 : load "Macaulay2Doc/demo1.m2"</pre> </td></tr> <tr><td><pre>i3 : code g o3 = /builddir/build/BUILD/Macaulay2-1.3.1-r10737/Macaulay2/packages/Macaulay2Doc/demo1.m2:11:7-14:8: --source code: g = y -> ( c := f(y-1); d := f(y-2); c+d)</pre> </td></tr> <tr><td><pre>i4 : g 2 /builddir/build/BUILD/Macaulay2-1.3.1-r10737/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:12:(3):[2]: error: division by zero /builddir/build/BUILD/Macaulay2-1.3.1-r10737/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:12:(3):[2]: --entering debugger (type help to see debugger commands) /builddir/build/BUILD/Macaulay2-1.3.1-r10737/Macaulay2/packages/Macaulay2Doc/demo1.m2:8:11-8:13: --source code: b := 1/x;</pre> </td></tr> <tr><td><pre>ii5 : code current oo5 = /builddir/build/BUILD/Macaulay2-1.3.1-r10737/Macaulay2/packages/ b := 1/x; ----------------------------------------------------------------------- Macaulay2Doc/demo1.m2:8:11-8:13: --source code:</pre> </td></tr> <tr><td><pre>ii6 : disassemble current oo6 = (2-OP / 1 (fetch 0 0))</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_pseudocode.html" title="produce the pseudocode for a function">pseudocode</a> -- produce the pseudocode for a function</span></li> </ul> </div> </div> </body> </html>