Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I looking for a better way to define a constant symbol, so that it evaluates when used.
Currently:
(setq rot pi)
.... (setq BKROT (quote (and (> rot (* pi 0.5)) (<= rot (* pi 1.5))))) ; define constant for Back Rotation .... (cond ((eval BKROT) (something happens)) ..... (cond ((not (eval BKROT)) (something happens)) ......
;; what I would like
(setmagic BKROT (quote (and (> rot (* pi 0.5)) (<= rot (* pi 1.5))))) ; define self evaluating constant
.....
(cond ( BKROT (something happens)) .....
Solved! Go to Solution.