home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!apple!cambridge.apple.com!bill@cambridge.apple.com
- From: bill@cambridge.apple.com (Bill St. Clair)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Re: Typep problem on array dimensions?
- Message-ID: <9209111930.AA25091@cambridge.apple.com>
- Date: 11 Sep 92 20:38:50 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 29
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Full-Name: Bill St. Clair
- Original-To: westling@starbase.mitre.org (Mark Westling)
- Original-Cc: info-mcl
-
- >I create an array like this:
- >
- >(setq ar (make-array '(4 4)
- > :element-type 'double-float
- > :initial-element 0.0))
- >
- >and, as expected,
- >
- > (type-of ar)
- > --> (simple-array double-float (4 4)).
- >
- >But here's what I get when I try a typep:
- >
- > (typep ar '(simple-array double-float (4 4)))
- > --> nil
- >
- >At first I thought this was a type discrimination problem,
- >but MCL 2.0 stores double-floats as double-floats; and then
- >I found:
- >
- > (typep ar '(simple-array double-float (* *)))
- > --> t
- >
- >What gives?
-
- Bug in TYPEP. Has probably been there at least since 2.0b1. I guess
- nobody has ever specified the dimensions of an array to TYPEP.
- I have prepared a patch for inclusion in patch 2 for MCL 2.0. I'll
- mail it to anyone who asks for "typep-of-array-patch".
-