<?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>numbered variables</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_numeric_sptypes.html">next</a> | <a href="_subscripted_spvariables.html">previous</a> | forward | <a href="_subscripted_spvariables.html">backward</a> | <a href="_variables.html">up</a> | <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> <div><a href="index.html" title="">Macaulay2Doc</a> > <a href="___The_sp__Macaulay2_splanguage.html" title="">The Macaulay2 language</a> > <a href="_variables.html" title="The variables of a complex or co-complex.">variables</a> > <a href="_numbered_spvariables.html" title="">numbered variables</a></div> <hr/> <div><h1>numbered variables</h1> <div>One way to get many variables suitable for use as indeterminates in a polynomial ring is with the function <a href="_vars.html" title="variables">vars</a>. It converts a list or sequence of integers into symbols. It prefers to hand out symbols whose name consists of a single letter, but there are only 52 such symbols, so it also uses symbols such as <tt>x55</tt> and <tt>X44</tt>.<table class="examples"><tr><td><pre>i1 : vars (0 .. 9,40,100,-100) o1 = (a, b, c, d, e, f, g, h, i, j, O, x48, X100) o1 : Sequence</pre> </td></tr> </table> These variables can be used to make polynomial rings.<table class="examples"><tr><td><pre>i2 : ZZ[vars(0 .. 10)] o2 = ZZ[a, b, c, d, e, f, g, h, i, j, k] o2 : PolynomialRing</pre> </td></tr> </table> </div> </div> </body> </html>