Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] How do I convert 0x hexadecimal integers to decimal integers ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <brian.hurt@q...>
Subject: Re: [Caml-list] How do I convert 0x hexadecimal integers to decimal integers ?

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