Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Printf.sprintf_and_string_of_float
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Matthieu Dubuget <matthieu.dubuget@m...>
Subject: Re: [Caml-list] Printf.sprintf and string_of_float
samsaga2 a écrit :
> Why are you passing a unit to sprintf?
> let unused_later = Printf.sprintf "string";;
> let string_of_float (float_number : float) = Printf.sprintf "%f" 
> float_number;
> This is ok for me

You are right, this was a typo in the mail. The line really added is

let unused_later = Printf.sprintf "string" ;;

But this is just an example. I just have to use Printf module
to crash my program.

The following line added in the ml file used to generate my lib/dll is another example:

let unused a = Printf.printf "%f" ;; 

Matthieu Dubuget

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: