[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Physical Copy of a structure?
- To: clisp-list <clisp-list@ma2s2.mathematik.uni-karlsruhe.de>
- Subject: Physical Copy of a structure?
- From: Mark Mueller <stoffel@cs.tu-berlin.de>
- Date: Wed, 10 Apr 1996 15:35:28 +0200
- Organization: TU Berlin
- References: <9603231144.AA01102@bfws00.forwiss.uni-erlangen.de>
- Sender: stoffel@cs.tu-berlin.de
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/