
20 Nov
2007
20 Nov
'07
10:01 p.m.
Hi, I would like to get a string for a number using always 2 digits (i.e., 75 would be "75", 3 would became "03"). What is the best way to do that? I tried printf "%02d\n" 3 which gives me the correct string, but ghci always ends that call with a *** Exception: Prelude.undefined message. What else should I try? Can Text.PrettyPrint do that? Thanks, Maurício