SV: Bug in SUBSEQ when accessing simple bit vectors

"Pavel Grozman" <[email protected]>
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>

> -----Ursprungligt meddelande-----
> Fran: xenophonf [mailto:[email protected]]
> Skickat: den 7 mars 2003 16:42
> Till: [email protected]
> 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:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.