scsh-users
[Top] [All Lists]

is this a bug?

To: <scsh-news@zurich.ai.mit.edu>
Subject: is this a bug?
From: Francisco Vides Fernandez <pax@ns3.dedaloingenieros.com>
Date: Tue, 1 Apr 2003 20:35:47 +0200
Hello. I have the following:

> 
> (define alist '(("a" . 1) ("b" . 2) ("c" . 3)))
> (define anentry (assoc "b" alist))
> anentry
'("b" . 2)
> (set-cdr! y 3)

Error: exception
       (set-cdr! '("b" . 2) 3)
1> 


But the following works fine

> 
> (define alist (list (cons "a"  1) (cons "b"  2) (cons "c"  3)))
> (set! y (assoc "b" alist))
> y
'("b" . 2)
> (set-cdr! y 3)
> y
'("b" . 3)
> alist
'(("a" . 1) ("b" . 3) ("c" . 3))
> 

I'm using scsh 0.6.2. I have tested this with other interpreters and
both work fine. Is this a known bug? Am I doing something wrong?

Saludos


-- 
+-----------------
| Francisco Vides Fernández <pax@dedaloingenieros.com>
| Director técnico.
| Teléfono fijo:   952 60 29 59
| Teléfono móvil:  661 67 32 73
| Fax:             952 60 29 59
| Dédalo Ingenieros http://www.dedaloingenieros.com/
| PGP: http://pgp.rediris.es:11371/pks/lookup?op=index&search=0x605ecbab
+------



<Prev in Thread] Current Thread [Next in Thread>