Artifact 6ae59ea6ce98a2b113a28c9a5339cbf74bcac29e0bf34f0499f835d70b9876fe:
- Executable file
r37/lisp/csl/html/r37_0213.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: 1867) [annotate] [blame] [check-ins using] [more...]
<A NAME=PRECEDENCE> <TITLE>PRECEDENCE</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>PRECEDENCE</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>declaration</B><P> <P> <P> <P> The <em>precedence</em> declaration attaches a precedence to an infix operator. <P> <H3> syntax: </H3> <P> <P> <em>precedence</em><operator>,<known\_operator> <P> <P> <P> <operator> should have been declared an operator but may be a REDUCE identifier that is not already an operator, array, or matrix. <known\_operator> must be a system infix operator or have had its precedence already declared. <P> <P> <P> <H3> examples: </H3> <P><PRE><TT> operator f,h; precedence f,+; precedence h,*; a + f(1,2)*c; (1 F 2)*C + A a + h(1,2)*c; 1 H 2*C + A a*1 f 2*c; A F 2*C a*1 h 2*c; 1 H 2*A*C </TT></PRE><P>The operator whose precedence is being declared is inserted into t he infix operator precedence list at the next higher place than <known\_operator>. <P> <P> Attaching a precedence to an operator has the side effect of declaring the operator to be infix. If the identifier argument for <em>precedence</em> has not been declared to be an operator, an attempt to use it causes an error message. After declaring it to be an operator, it becomes an infix operator with the precedence previously given. Infix operators may be used in prefix form; if they are used in infix form, a space must be left on each side of the operator to avoid ambiguity. Declared infix operators are always binary. <P> <P> To see the infix operator precedence list, enter symbolic mode and type <em>preclis!*;</em>. The lowest precedence operator is listed first. <P> <P> All prefix operators have precedence higher than infix operators. <P> <P> <P>