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 TAA17132; Thu, 27 Mar 2003 19:23:30 +0100 (MET) 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 TAA17602 for ; Thu, 27 Mar 2003 19:23:29 +0100 (MET) Received: from epexch01.qlogic.org ([63.170.40.3]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h2RINR502659 for ; Thu, 27 Mar 2003 19:23:28 +0100 (MET) Received: from epmailtmp.qlogic.org ([10.20.33.254]) by epexch01.qlogic.org with Microsoft SMTPSVC(5.0.2195.5329); Thu, 27 Mar 2003 12:24:11 -0600 Received: from [10.20.33.146] ([10.20.33.146]) by epmailtmp.qlogic.org with Microsoft SMTPSVC(5.0.2195.4905); Thu, 27 Mar 2003 12:24:10 -0600 Date: Thu, 27 Mar 2003 12:24:10 -0600 (CST) From: Brian Hurt X-X-Sender: Reply-To: Brian Hurt To: Stalkern 2 cc: Subject: Re: [Caml-list] How do I convert 0x hexadecimal integers to decimal integers ? In-Reply-To: <200303271854.55964.stalkern2@tin.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 27 Mar 2003 18:24:10.0916 (UTC) FILETIME=[0FE78640:01C2F48E] X-Spam: no; 0.00; qlogic:01 caml-list:01 hexstring:01 printf:01 sprintf:01 int:01 binary:02 string:03 let:04 decimal:05 integers:05 hexadecimal:05 integer:06 brian:06 maybe:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Or maybe you want to do this: let hexstring_of_int x = Printf.sprintf "%x" x ;; Although once I got the integer into binary int form, I wouldn't convert it back to a string untill I was printing the answer back. I would instead do the shift/and code instead. Brian ------------------- 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