logo       

SV: Bug in SUBSEQ when accessing simple bit vectors: msg#00026

lisp.corman

Subject: SV: Bug in SUBSEQ when accessing simple bit vectors



> -----Ursprungligt meddelande-----
> Fran: xenophonf [mailto:xenophon+cormanlisp@xxxxxxxxxx]
> Skickat: den 7 mars 2003 16:42
> Till: cormanlisp@xxxxxxxxxxxxxxx
> Amne: [cormanlisp] Bug in SUBSEQ when accessing simple bit vectors
>
>
> SUBSEQ doesn't return the proper values when operating on simple bit
> vectors. For example, Corman Lisp 2.01:
>
> ? (subseq (copy-seq #8*01101001) 0 4)
> #*0000
>
> Whereas in Clisp 2.29 (on Mac OS X 10.2.4):
>
> [1]> (subseq (copy-seq #8*01101001) 0 4)
> #*0110
>
> And in CMUCL 18d (on Red Hat Linux 8):
>
> * (subseq (copy-seq #8*01101001) 0 4)
>
> #*0110

The error is in function cl::setelt that is used in subseq.
This function is used instead of (setf elt) before (setf elt)
is defined. But setq was defined before (setf elt).

To fix the problem redefine cl::setelt

(defun cl::setelt (val array ind)
(setf (elt array ind) val))

Pavel Grozman

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
cormanlisp-unsubscribe@xxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise