home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / lisp / mcl / 1346 < prev    next >
Encoding:
Text File  |  1992-08-31  |  984 b   |  40 lines

  1. Newsgroups: comp.lang.lisp.mcl
  2. Path: sparky!uunet!sun-barr!ames!agate!linus!linus.mitre.org!starbase!westling
  3. From: westling@starbase.mitre.org (Mark Westling)
  4. Subject: Typep problem on array dimensions?
  5. Message-ID: <westling.715280890@starbase>
  6. Sender: news@linus.mitre.org (News Service)
  7. Nntp-Posting-Host: starbase.mitre.org
  8. Organization: The MITRE Corporation
  9. Distribution: na
  10. Date: Mon, 31 Aug 1992 17:08:10 GMT
  11. Lines: 27
  12.  
  13. I create an array like this:
  14.  
  15. (setq ar (make-array '(4 4) 
  16.                :element-type 'double-float
  17.                :initial-element 0.0))
  18.  
  19. and, as expected, 
  20.  
  21.   (type-of ar)
  22.   -->  (simple-array double-float (4 4)).
  23.  
  24. But here's what I get when I try a typep:
  25.  
  26.  (typep ar '(simple-array double-float (4 4))) 
  27.   --> nil
  28.  
  29. At first I thought this was a type discrimination problem,
  30. but MCL 2.0 stores double-floats as double-floats; and then
  31. I found:
  32.  
  33.   (typep ar '(simple-array double-float (* *)))
  34.   --> t
  35.  
  36. What gives?
  37.  
  38. Mark Westling
  39. The MITRE Corporation
  40.