English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
Browse thread
[Caml-list] Hash tables keys and values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Vincent Foley <vinfoley@i...>
Subject: [Caml-list] Hash tables keys and values
Hi, I have a hashtables of all 26 characters of the alphabet: these are
my keys.  They are all associated with the number of times they appear
in an arbitrary text file.  Once I have my hash table complete, I would
like to print each key with its associated value.  How would I do this?
Right now I only have the values:

   Hashtbl.iter (fun k -> Printf.printf "%d\n") myhash;

Is there any way I could print both keys and values?

Thank you,

Vincent Foley


-- 

Vincent Foley-Bourgon
Email: vinfoley@iquebec.com
Homepage: http://darkhost.mine.nu:81
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners