From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA08871; Thu, 23 May 2002 20:24:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA08891 for ; Thu, 23 May 2002 20:24:50 +0200 (MET DST) Received: from VL-MS-MR003.sc1.videotron.ca (relais.videotron.ca [24.201.245.36]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4NIOnD14093 for ; Thu, 23 May 2002 20:24:49 +0200 (MET DST) Received: from vincent ([66.130.50.101]) by VL-MS-MR003.sc1.videotron.ca (Netscape Messaging Server 4.15 MR003 Jul 24 2001 16:23:26) with ESMTP id GWKTTC03.67S for ; Thu, 23 May 2002 14:24:48 -0400 Received: from vince by vincent with local (Exim 3.35 #1 (Debian)) id 17AxGc-0004k7-00 for ; Thu, 23 May 2002 14:24:50 -0400 Date: Thu, 23 May 2002 14:24:50 -0400 To: OCaml Mailing list Subject: [Caml-list] Hash tables keys and values Message-ID: <20020523182450.GA18222@vincent> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i From: Vincent Foley Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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