[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SETF ; I think
- To: BUG-LISP at MIT-MC
- Subject: SETF ; I think
- From: John G. Aspinall <JGA at MIT-MC>
- Date: Mon, 13 Jul 81 19:27:00 GMT
- Cc: JGA at MIT-MC
- Original-date: 13 July 1981 15:27-EDT
I'm sorry that I don't have a simpler example of this.
(load '((jga) ht))
this will load other files - notably JGA;PLOT, JGA;HOUSPL and JGA;GDEFS.
If none of those files are compiled, it runs fine - ignore the
wierd characters output to the tty - those will be understood by the
plotter this will eventually speak to.
However if JGA;PLOT and JGA;GDEFS are compiled, the same code bombs
out. Some poking around reveals the problem happens in the function
houst:move but in a pretty strange manner.
(defun houst:move (x y)
(declare (fixnum x y) (special current-tty-state current-viewport))
(let ((dx (- x (view-pen-x)))
(dy (- y (view-pen-y))))
(declare (fixnum dx dy))
(let ((adx (abs dx))
(ady (abs dy))
(sign-x (if (minusp dx) 40 100))
(sign-y (if (minusp dy) 40 100)))
(declare (fixnum adx ady sign-x sign-y))
(mapc #'(lambda (vector)
(set-vector-repeat (car vector))
(+tyo (+ (cadr vector) sign-x) graphic-output)
(+tyo (+ (caddr vector) sign-y) graphic-output))
(setf (view-pen-x) x)
(setf (view-pen-y) y)
When evaluating the setf at the end - (setf (view-pen-x) x) it finds x
is bound to the symbol STRUCT=INFO. This symbol appears nowhere in
any of my code, however it does appear in the EXTSTR package. The
setf and the structure reference (view-pen-x) expand correctly into
(store (arraycall fixnum ...)...) but x is now bound to this clearly
out-of-place symbol. Furthermore, this happened sometime during the
evaluation of this function, because x is used at the beginning of the
let form that starts the function, and this does not give an error.
This looks as if it might be a missing comma, or something similar,
but I have exhausted the obvious avenues of approach.