Re: printing readably an array of type bit!
- From: "\"(typep 'nil (statisfies 'identity))\"" <christophamort@xxxxxxxx>
- Date: Fri, 31 Oct 2008 03:08:31 -0700 (PDT)
.... here the non portable way to this:
(defmethod print-object ((array0 array) (stream0 stream))
(if (eq 'bit (array-element-type array0))
(format stream0 "~S"
`(make-array ',(array-dimensions array0)
:element-type ',(array-element-type array0)
:initial-contents ',(loop
with m of-type unsigned-
byte = (array-dimension array0 0)
for i from 0 below m
collect (loop for j from 0
below m
collect (bit
array0 i j)))))
(call-next-method)))
.... it would be interesting to see in how many implementation this
code works!
c.
.
- Follow-Ups:
- Re: printing readably an array of type bit!
- From: Barry Margolin
- Re: printing readably an array of type bit!
- References:
- printing readably an array of type bit!
- From: \"(typep 'nil (statisfies 'identity))\"
- Re: printing readably an array of type bit!
- From: Barry Margolin
- Re: printing readably an array of type bit!
- From: \"(typep 'nil (statisfies 'identity))\"
- printing readably an array of type bit!
- Prev by Date: Re: printing readably an array of type bit!
- Next by Date: Re: Global lexical variables?
- Previous by thread: Re: printing readably an array of type bit!
- Next by thread: Re: printing readably an array of type bit!
- Index(es):