[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple example of my bug of 13 July 1981 15:27-EDT



;; OK here's a simple example of the bug I reported before -

;; in JGA;T1 find the following -

(include ((libmax) gprelude))

(load '((jga) t2))

(setq current-foo (make-foo))

(defun blowout (x y this-foo)
  (declare (flonum x y))
  (setf (foo-slot-a this-foo) x)
  (setf (foo-slot-b this-foo) y))

;; and JGA;T2 (which is compiled) just contains the defstruct -

(include ((libmax) gprelude))

(defstruct (foo (type flonum-array))
  (foo-slot-a 0.0)
  (foo-slot-b 0.0))

;; now in a regular lisp

(load '((jga) t1))
(blowout 2.0 3.0 current-foo)

;; will demonstrate the bug - you will find x bound to STRUCT=INFO

I hope this is simple enough to allow you to track it down easily.
John.