chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Hashtable is behaving unexpectedly


From: Michael Erdmann
Subject: [Chicken-users] Hashtable is behaving unexpectedly
Date: Thu, 30 Sep 2004 10:55:35 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616


Dear all the code fragement below works as expected:

(define h (make-hash-table))

(define A_Age 'Age)
(define Michael "Michael")

(put! h Michael A_Age 45)
(write (get h Michael A_Age )) (newline)
(write (hash-table-ref h Michael)) (newline)

(write (hash-table->list h)) (newline)                                       

address@hidden:~/scheme/x> ./ht
45
((Age . 45))
(("Michael" (Age . 45)))

_but_ when i am replacing Michael by "Michael" every where
where i invoke get it fails. Probly because they are not
the same objects.

Why is it like this implemented? It is not very helpfull
in this implementation, or did i miss something?

Regards
   M.Erdmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]