From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA04691; Thu, 2 Oct 2003 16:55:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA11978 for ; Thu, 2 Oct 2003 16:55:02 +0200 (MET DST) Received: from mwinf0604.wanadoo.fr (smtp3.wanadoo.fr [193.252.22.25]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h92Et2129174 for ; Thu, 2 Oct 2003 16:55:02 +0200 (MET DST) Received: from ADijon-106-1-6-5.w81-48.abo.wanadoo.fr (ADijon-106-1-6-5.w81-48.abo.wanadoo.fr [81.48.141.5]) by mwinf0604.wanadoo.fr (SMTP Server) with ESMTP id AEDAB28000F7; Thu, 2 Oct 2003 16:55:01 +0200 (CEST) Received: from 192.168.1.62 (ident=mail) by poulain.metalscan.fr with esmtp (MasqMail 0.1.16) id 1A55Hd-0et-00; Thu, 02 Oct 2003 17:22:25 +0200 Received: from invitemdt1.metalscan.fr ([192.168.1.33] helo=metalscan.fr) by drakar.metalscan.fr with esmtp (Exim 3.35 #1 (Debian)) id 1A54p6-0003Zr-00; Thu, 02 Oct 2003 16:52:56 +0200 Message-ID: <3F7C3BE4.6070108@metalscan.fr> Date: Thu, 02 Oct 2003 16:53:24 +0200 From: Matthieu Dubuget Reply-To: matthieu.dubuget@metalscan.fr Organization: Metalscan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.3) Gecko/20030312 X-Accept-Language: fr, en MIME-Version: 1.0 To: samsaga2 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Printf.sprintf and string_of_float References: <3F7C3696.5090608@stratos-ad.com> In-Reply-To: <3F7C3696.5090608@stratos-ad.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 metalscan:01 caml-list:01 printf:01 sprintf:01 passing:01 sprintf:01 printf:01 ecrit:01 lib:01 float:02 float:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 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