Sorry, my previous example was wrong. I meant this:
>
> (define alist '(("a" . 1) ("b" . 2) ("c" . 3)))
> (define anentry (assoc "b" alist))
> anentry
'("b" . 2)
> (set-cdr! anentry 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))
> anentry
'("b" . 2)
> (set-cdr! anentry 3)
> anentry
'("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
+------
|