From: Lutz E. <eu...@we...> - 2002-12-03 21:31:21
|
Hi, I am using sbcl-0.7.10 and noticed a bug in describe, namely it can't describe arrays of rank 0: * (describe (make-array '())) debugger invoked on condition of type TYPE-ERROR: The value #0A0 is not of type VECTOR. [...] The same error occurs in cmucl-18b. Here is a fix: In the file "src/code/describe.lisp" change the method on describe-object for arrays as follows: (defmethod describe-object ((x array) s) (let ((rank (array-rank x))) (cond ((= rank 1) (format s "~@:_~S is a ~:[~;displaced ~]vector of length ~S." x (and (array-header-p x) (%array-displaced-p x)) (length x)) (when (array-has-fill-pointer-p x) (format s "~@:_It has a fill pointer, currently ~S." (fill-pointer x)))) (t (format s "~S ~_is " x) (write-string (if (%array-displaced-p x) "a displaced" "an") s) (format s " array of rank ~S." rank) (unless (= rank 0) (format s "~@:_Its dimensions are ~S." (array-dimensions x)))))) (let ((array-element-type (array-element-type x))) (unless (eq array-element-type t) (format s "~@:_Its element type is specialized to ~S." array-element-type)))) Yours Lutz Euler ______________________________________________________________________________ Sieben auf einen Streich? Mit der Gruppen-SMS von WEB.DE FreeMail kein Problem. http://freemail.web.de/features/?mc=021179 |