close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 4409 for branches


Ignore:
Timestamp:
2016-06-07T19:51:22-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/infix-printer.lisp

    r4408 r4409  
    4747      (incf count)
    4848
    49       ;; TODO: Determine why this is here and fix it.
    50       ;; If uncommented, causes (+ x (- y z)) print as "X-Y"
    51       ;; which is not correct
     49      ;; This is to handle unary minus and unary division.
     50      ;; Thus:
     51      ;; (+ x (- y z)) --> X + Y - Z
     52      ;; (+ x (- y)) --> X - Y
    5253      (when (and alt-op
    5354                 (> count 1)
     
    121122         (cond ((eq (car expr) '+) '-)
    122123               ((eq (car expr) '-) '-)
     124               ((eq (car expr) '*) '/)
     125               ((eq (car expr) '/) '/)
    123126               (t nil))))
    124127
Note: See TracChangeset for help on using the changeset viewer.