Subject: Re: aref with N dimension arrays
From: rpw3@rpw3.org (Rob Warnock)
Date: Tue, 07 Mar 2006 23:38:09 -0600
Newsgroups: comp.lang.lisp
Message-ID: <SqKdncIuJ7pc8JPZRVn-uQ@speakeasy.net>
Jason <jemeade@gmail.com> wrote:
+---------------
| I am trying to do something like this:
| (setq (aref array-1 '(0 0 0)) (aref array-2 '(0 0 0)))
| 
| My compiler is complaining, rightfully so, that I am passing a single
| item (a list) as subscript arguments, when three items were expected. I
| need to convert the above to something the compiler will understand...
+---------------

Try this:

    (setq (apply #'aref array-1 '(0 0 0)) (apply #'aref array-2 '(0 0 0)))

It works fine on CMUCL, though I'm not sure it's required to...


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607