On Thursday, April 17, 2014 6:34:49 AM UTC+2, Jinsong Zhao wrote:
> Hi there,
> I have an array:
>
> (defvar x (make-array '(5 5) :initial-contents '((1 1 1 1 1)
> (2 2 2 2 2)
> (3 3 3 3 3)
> (4 4 4 4 4)
> (5 5 5 5 5))))
>
> Is there a easy way to access or get whole column? For row, I can use
> :displaced-to.
No. There is no way to access a "column" unless you copy. Arrays are stored in row major form.
> Another question, is there a easy way to get x[2, 2:4]?
Not directly in the standard. There are libraries and bits and pieces of code to do that.
I should have something laying around. Drop me a line in private...
Cheers
--
MA