Version française
Home     About     Download     Resources     Contact us    
Browse thread
sprintf-Bug?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oliver Bandel <oliver@f...>
Subject: sprintf-Bug?
Hello,

this I explored:

# let hex_of_byte b = Printf.sprintf "%02s" (Printf.sprintf "%0X" b);;                                        
val hex_of_byte : int -> string = <fun>
# hex_of_byte 12;;                                                                                            
- : string = " C"

Shouldn't the result be "0C" ?!
(I'm using OCaml 3.09.3.)


Ciao,
  Oliver