copying arrays
- From: Q <qalex1@xxxxxxxxx>
- Date: 28 Apr 2007 20:16:16 -0700
Hi all,
Simple question:
CL-USER 37 > (setf a (make-array 5 :initial-element 7))
#(7 7 7 7 7)
CL-USER 38 > (setf b a)
#(7 7 7 7 7)
CL-USER 39 > (eq a b)
T
CL-USER 40 > (setf (aref a 0) 9)
9
CL-USER 41 > a
#(9 7 7 7 7)
CL-USER 42 > b
#(9 7 7 7 7)
How do I pass copies of the array around, instead of the array
itself? I don't want them to be eq. But, it'd be nice if they were
equal :)
.
- Follow-Ups:
- Re: copying arrays
- From: Espen Vestre
- Re: copying arrays
- From: Alan Manuel K. Gloria
- Re: copying arrays
- From: Frank Buss
- Re: copying arrays
- From: Ken Tilton
- Re: copying arrays
- Prev by Date: Re: pattern-matching in LISP?
- Next by Date: Re: Any macro for inserting math "normally"
- Previous by thread: Opposite of ~^ FORMAT Directive
- Next by thread: Re: copying arrays
- Index(es):