Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] productivity improvement
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] productivity improvement
> > let print_aux hours minutes = 
> >     if hours < 10 then print_char ' ';
> >     print_int hours;
> >     print_char ':';
> >     if minutes < 10 then print_char '0';
> >     print_int minutes;;
> 
> let print_aux h m = printf
>    (if minutes < 10 then "%2d:0%1d" else "%2d:%2d") h m

let print_aux = printf "%02d:%02d"

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
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