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

2 problems



We are running genera 7.2 on 3650's.  I've experienced the following 2
problems:

1) Suppose I have the following:

(defvar *a*)
(defvar *b*)

(defun eq-test ()
  (let ((a '(a b c d))
         (b '(a b c d)))
    (setq *a* a)
    (setq *b* b)))

After running eq-test, it turns out that *a* and *b* are eq!
This, by the way, occurs with arrays, strings, etc.  The only
way to avoid this is to make liberal use of copy-* in these
functions.

2) Suppose I have a structure named rts which is stored as a
named vector.  Given an instance of this structure, rts-1,
if I then do (setq rts-2 (copy-rts rts-1)), I find that although
every slot of rts-2 is eq to the corresponding slot in rts-1,
rts-1 and rts-2 are not equal !  

Moreover, given that the nominal-equipment-list slot of rts is a list
of equipment structures, I find that

(eq (rts-nominal-equipment-list rts-1)
    (rts-nominal-equipment-list rts-2))

returns t, but when I do 

(push t (rts-nominal-equipment-list rts-1))

rts-1 is modified but rts-2 is not!

Thanks for your help.

Barry Smith