Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Arrays

2 views
Skip to first unread message

Andrew K. Wolven

unread,
Apr 9, 2000, 3:00:00 AM4/9/00
to

"G. Milligan" wrote:

> is it possible to have a 3d dimensional array? as in make-array '(6 7
> 7)?
> I have to make a 3d connect4 game for school, and it would be much
> simpler if this was possible.
>
> thanks

sure looks like you're on the right track to me.

(make-array '(6 7 7))

#3A(((NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL))
((NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL))
((NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL))
((NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL))
((NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL))
((NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)
(NIL NIL NIL NIL NIL NIL NIL)))


G. Milligan

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to

G. Milligan

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to
I thought I was too, but for some reason I keep getting this:
> (make-array '(6 7 7))
error: bad argument type - (6 7 7)


"Andrew K. Wolven" wrote:

Rahul Jain

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to
In article <38F1FBAC...@home.com> posted on Monday, April

10, 2000 8:03 AM, "G. Milligan" <bel...@home.com> wrote:
> I thought I was too, but for some reason I keep getting this:
>> (make-array '(6 7 7))
> error: bad argument type - (6 7 7)
>
>

Is this Common Lisp?
If so, which compiler?

--
-> -\-=-=-=-=-=-=-=-=-=-/^\-=-=-=<*><*>=-=-=-/^\-=-=-=-=-=-=-=-=-=-/- <-
-> -/-=-=-=-=-=-=-=-=-=/ { Rahul -<>- Jain } \=-=-=-=-=-=-=-=-=-\- <-
-> -\- "I never could get the hang of Thursdays." - HHGTTG by DNA -/- <-
-> -/- http://photino.sid.rice.edu/ -=- mailto:rahul...@usa.net -\- <-
|--|--------|--------------|----|-------------|------|---------|-----|-|
Version 11.423.999.210020101.23.50110101.042
(c)1996-2000, All rights reserved. Disclaimer available upon request.


G. Milligan

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to
I'm using XLISP

David Hanley

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to

"G. Milligan" wrote:

> I'm using XLISP

I'd suggest using clisp if possible. You'll be able to find
tutorials, references, and get help from comp.lang.lisp
folks much more easily. I suggest clisp because it's
easy to install and has good help facilities.

dave


Thomas A. Russ

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to
"G. Milligan" <bel...@home.com> writes:

>
> I thought I was too, but for some reason I keep getting this:
> > (make-array '(6 7 7))
> error: bad argument type - (6 7 7)

Which Lisp are you using?

--
Thomas A. Russ, USC/Information Sciences Institute t...@isi.edu

Marco Antoniotti

unread,
Apr 11, 2000, 3:00:00 AM4/11/00
to

"G. Milligan" <bel...@home.com> writes:

> I'm using XLISP

Bad idea. XLisp is not Common Lisp. Dump it and get either CMUCL
(www.cons.org), CLisp (clisp.cons.org), LWW (www.xanalys.com) or ACL
(www.franz.com).

Cheers

--
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa

0 new messages