home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / lisp / mcl / 1364 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.3 KB  |  43 lines

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!apple!cambridge.apple.com!bill@cambridge.apple.com
  2. From: bill@cambridge.apple.com (Bill St. Clair)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Re: Typep problem on array dimensions?
  5. Message-ID: <9209111930.AA25091@cambridge.apple.com>
  6. Date: 11 Sep 92 20:38:50 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 29
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10. Full-Name: Bill St. Clair
  11. Original-To: westling@starbase.mitre.org (Mark Westling)
  12. Original-Cc: info-mcl
  13.  
  14. >I create an array like this:
  15. >
  16. >(setq ar (make-array '(4 4) 
  17. >               :element-type 'double-float
  18. >               :initial-element 0.0))
  19. >
  20. >and, as expected, 
  21. >
  22. >  (type-of ar)
  23. >  -->  (simple-array double-float (4 4)).
  24. >
  25. >But here's what I get when I try a typep:
  26. >
  27. > (typep ar '(simple-array double-float (4 4))) 
  28. >  --> nil
  29. >
  30. >At first I thought this was a type discrimination problem,
  31. >but MCL 2.0 stores double-floats as double-floats; and then
  32. >I found:
  33. >
  34. >  (typep ar '(simple-array double-float (* *)))
  35. >  --> t
  36. >
  37. >What gives?
  38.  
  39. Bug in TYPEP. Has probably been there at least since 2.0b1. I guess
  40. nobody has ever specified the dimensions of an array to TYPEP.
  41. I have prepared a patch for inclusion in patch 2 for MCL 2.0. I'll
  42. mail it to anyone who asks for "typep-of-array-patch".
  43.