From: Rainer Joswig
Subject: Re: Array Dimensions
Date: 
Message-ID: <joswig-58FC84.09515030062008@news-europe.giganews.com>
In article 
<····································@8g2000hse.googlegroups.com>,
 Francogrex <······@grex.org> wrote:

> 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?

(make-array (list rows 2))

-- 
http://lispm.dyndns.org/
From: Vassil Nikolov
Subject: Re: Array Dimensions
Date: 
Message-ID: <snztzfbmaib.fsf@luna.vassil.nikolov.name>
On Mon, 30 Jun 2008 09:51:51 +0200, Rainer Joswig <······@lisp.de> said:
| ...
| (make-array (list rows 2))

  Or possibly (MAKE-ARRAY `(,ROWS 2)).

  ---Vassil.


-- 
Peius melius est.  ---Ricardus Gabriel.