Artifact bc461af013fe33de2f1acc50e23f394f3cb38b0e6f8ab3547105aaba5e5296c6:
- Executable file
r37/lisp/csl/html/r37_0162.html
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1406) [annotate] [blame] [check-ins using] [more...]
<A NAME=MAINVAR> <TITLE>MAINVAR</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>MAINVAR</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P> <P> <P> <P> The <em>mainvar</em> operator returns the main variable (in the system's internal representation) of its argument. <P> <H3> syntax: </H3> <P> <P> <em>mainvar</em>(<expression>) <P> <P> <P> <P> <expression> is usually a polynomial, but may be any valid REDUCE scalar expression. In the case of a rational function, the main variable of the numerator is returned. The main variable returned is a <A HREF=r37_0002.html>kernel</A>. <P> <P> <P> <H3> examples: </H3> <P><PRE><TT> test := (a + b + c)**2; 2 2 2 TEST := A + 2*A*B + 2*A*C + B + 2*B*C + C mainvar(test); A korder c,b,a; mainvar(test); C mainvar(2*cos(x)**2); COS(X) mainvar(17); 0 </TT></PRE><P>The main variable is the first variable in the canonical ordering of kernels. Generally, alphabetically ordered functions come first, then alphabetically ordered identifiers (variables). Numbers come last, and as far as <em>mainvar</em> is concerned belong in the family <em>0</em>. The canonical ordering can be changed by the declaration <A HREF=r37_0198.html>korder</A>, as shown above. <P> <P> <P>