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

Physical Copy of a structure?



How can i make a physical copy of a structure? 

setq doesn't work:

> (defstruct test (name 'unnamed))
TEST
> (setq one (make-test))
#S(TEST :NAME UNNAMED)
> (setq other one)
#S(TEST :NAME UNNAMED)
> (setf (test-name other) 'other)
OTHER
> other
#S(TEST :NAME OTHER)
> one
#S(TEST :NAME OTHER)
> 

one and other seem to point to the same structure. Is there
a simple operation without making a new structure and fill all
slots from other seperately with the slot-contents from one 
(in this example it isn't much, but my real structures are much bigger
...)

thanks in Advance, 

Mark 

-- 
Mark Müller * Institut für Angewandte Informatik * FG Methoden der KI 
Sekr. 5-8 * Franklinstr.28-29 * 10587 Berlin * Tel.: 314-21005        
     Email:  pandur@cs.tu-berlin.de * stoffel@cs.tu-berlin.de          
           WWW: http://www.cs.tu-berlin.de/~pandur/