From: Bettina Schimanski

Subject: Array copy

Date: 2002-5-2 18:20

I apologize for bothering you with what must be such a simple question 
to all of you but I could really use some good "beginners" advice. I am 
a graduate student in the process of teaching myself Common Lisp with 
Allegro CL Professional 5.0 and would like to make a copy of an array. I 
have been using setf, but just realized that this really just makes the 
new variable point to the old array and so when the new array is changed 
so is the old, which I would really like to avoid (a common programming 
problem to avoid). I can go through tediously and 

(setf (aref new-array row col) (aref old-array row col)) 

for every single element, but I'm sure there is a more sophisticated way 
which I would like to learn. I have found a copy function for lists, 
readtables, trees, sequences, but not for arrays. Is it possible that 
someone could point me in the right direction by either informing me of 
a good reference book which would discuss what I need to know, some 
tutorial on-line (esp. on the the Franz site), or perhaps if you already 
know what I am talking about how to solve this issue. 

I know I'll have more questions similar in nature to this in the future, 
so it would help if you know of good references that I could look into, 
or perhaps that I need to go through one of the one I have even more 
thoroughly. I currently have the following which explain basics but are 
not indepth enough in this:

"Ansi Common Lisp" by Paul Graham
"Common Lisp" by Guy Steele Jr.
"The Common Lisp Companion" by Timothy Koschmann
"Lisp, 3rd Edition" by Patrick Winston and Berthold Horn

Thank you for your time and effort,
Bettina