PRET INDEX

PRET _ _ _ _ _ _ _ _ _ _ _ _ switch

When pret is on, input is printed in standard REDUCE format and then evaluated.

examples:


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>=0)
     then rederr "Choose nonneg. integer only"
    else for i := 0:n-1 product i+1;
 

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



fac 5; 

  fac 5;
  120

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 if...then...else are printed in a standard format.