From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA25756 for caml-redistribution; Tue, 18 Feb 1997 15:59:58 +0100 (MET) 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 SAA00409 for ; Thu, 13 Feb 1997 18:26:53 +0100 (MET) Received: from portal.west.saic.com (portal.west.saic.com [198.151.12.15]) by concorde.inria.fr (8.7.6/8.7.3) with SMTP id SAA01148 for ; Thu, 13 Feb 1997 18:26:50 +0100 (MET) Received: from abetti.psds.saic.com ([139.121.177.11]) by portal.west.saic.com via smtpd (for concorde.inria.fr [192.93.2.39]) with SMTP; 13 Feb 1997 17:26:47 UT Received: from BONDK (bondk.psds.saic.com [139.121.177.55]) by abetti (8.6.9/8.6.9) with SMTP id NAA22295; Thu, 13 Feb 1997 13:31:02 -0500 Date: Thu, 13 Feb 1997 13:31:02 -0500 Message-Id: <199702131831.NAA22295@abetti> From: "T. Kurt Bond" To: caml-list@pauillac.inria.fr CC: tkb@wvlink.mpl.com Subject: string variables in Printf.* calls: Bug, or lack of understanding? Sender: weis Hello, [I apologize for the lack of a French version of this message.] I recently observed the following while runing Objective Caml under Windows NT and UnixWare 1.1: Objective Caml version 1.03 [1] # let s = "%f" in Printf.printf s 10.5;; Characters 30-31: This expression has type string but is here used with type ('a, out_channel, unit) format [2] # Printf.printf "%f" 10.5;; 10.500000- : unit = () I don't understand why the variable s, which is bound to a string value, causes the error in statement 1, while using a literal string in statement 2 works as expected. Can anyone explain? Or is this a bug? -- T. Kurt Bond, Thomas.K.Bond@cpmx.saic.com