Sophie

Sophie

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

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>examples -- list the examples in documentation</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="___Exclude.html">next</a> | <a href="___E__X__A__M__P__L__E.html">previous</a> | <a href="___Exclude.html">forward</a> | <a href="___E__X__A__M__P__L__E.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>examples -- list the examples in documentation</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>examples s</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>s</tt>, a descriptor for a documentation node (see below for examples)</span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="___Net.html">net</a></span>, containing examples of code provided in the documentation of <tt>s</tt></span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div>The output is returned as a <a href="___Net.html" title="the class of all nets and strings">Net</a> of height 0, so the examples will be displayed indented by just white space, allowing immediate entry.  Alternatively, one could use <a href="_print.html" title="print something">print</a> to display them with no indentation.<table class="examples"><tr><td><pre>i1 : examples "while"
--loading the Macaulay2 documentation from /builddir/build/BUILD/Macaulay2-1.3.1-r10737/Macaulay2/packages/Macaulay2Doc/

o1 = 
     i = 0 ; while i &lt; 10 list i^2 do i = i+1
     i = 0 ; while i &lt; 4 do (print i; i = i+1)
     i = 0 ; while i &lt; 10 list (i = i+1; i^2)
     i = 0 ; while i &lt; 10 list (i = i+1; if odd i then continue; i^2)
     i = 0 ; while i &lt; 10 list (i = i+1; if odd i then continue x; i^2)
     i = 0 ; while i &lt; 10 list (i = i+1; if i == 5 then break i; i^2)
     i = 0 ; while i &lt; 10 list (i = i+1; if i == 5 then break; i^2)</pre>
</td></tr>
<tr><td><pre>i2 : examples (ideal,Matrix)

o2 = 
     R = ZZ/7[w,x,y,z];
     f = vars R
     ideal f
     g = matrix{{x^2-w*y, x*y-w*z, x*z-y^2},{y^2-x*z,x^2*y-z^2,x^3-y*z}}
     ideal g</pre>
</td></tr>
<tr><td><pre>i3 : print oo
R = ZZ/7[w,x,y,z];
f = vars R
ideal f
g = matrix{{x^2-w*y, x*y-w*z, x*z-y^2},{y^2-x*z,x^2*y-z^2,x^3-y*z}}
ideal g</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_reading_spthe_spdocumentation.html" title="">reading the documentation</a></span></li>
<li><span><a href="_help.html" title="help command">help</a> -- help command</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>examples</tt> :</h2>
<ul><li>examples(Thing)</li>
</ul>
</div>
</div>
</body>
</html>