File r37/lisp/csl/html/r37_0318.html artifact 02525255a1 part of check-in 955d0a90a7



<A NAME=PRET>

<TITLE>PRET</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>PRET</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>switch</B><P>
<P>
 
 <P>
<P>
When <em>pret</em> is on, input is printed in standard REDUCE format and then 
evaluated. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
on pret; 

 (x+1)^3; 

   (x + 1)**3;
   3      2
  X  + 3*X  + 3*X + 1



procedure fac(n);
   if not (fixp(n) and n&gt;=0)
     then rederr &quot;Choose nonneg. integer only&quot;
    else for i := 0:n-1 product i+1;
 

  procedure fac n;
     if not (fixp n and n&gt;=0)
       then rederr &quot;Choose nonneg. integer only&quot;
      else for i := 0:n - 1 product i + 1;
  FAC



fac 5; 

  fac 5;
  120

</TT></PRE><P>Note that all input is converted to lower case except strings (whi
ch keep 
the same case) all operators with a single argument have had the 
parentheses removed, and all infix operators have had a space added on each 
side. In addition, syntactical constructs like 
<em>if</em>...<em>then</em>...<em>else</em> are printed in a standard format. 
<P>
<P>
<P>


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]