From: Paul Donnelly
Subject: Re: Array Dimensions
Date: 
Message-ID: <87fxqvbafy.fsf@plap.localdomain>
Francogrex <······@grex.org> writes:

> This is probably straightforward to experts but I can't find a work-
> around:
>
> If I want to create an array (to fill later) this seems
> straightforward:
>> (setf StoreArray (make-array '(5 2)))
> #2A((NIL NIL) (NIL NIL) (NIL NIL) (NIL NIL) (NIL NIL))
>
> But I am trying to make an array have dimensions provided by a
> generated variable named "rows" within a program:
>> (setf rows 5)
> 5
>> (setf StoreArray (make-array '(rows 2)))
> MAKE-ARRAY: dimension ROWS is not of type `(INTEGER 0 (,ARRAY-
> DIMENSION-LIMIT))
>
> How can I force "make-array" to recognize that "rows" represents a
> value of 5?

What you've done here is pass a quoted list to MAKE-ARRAY.

'(rows 2) = (list 'rows 2)

So your Lisp tells you that the symbol ROWS is not of type `(INTEGER 0
(,ARRAY-DIMENSION-LIMIT)), meaning it's not an integer between zero and
the maximum possible array size (it's not a number at all, of course).