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 LAA17538; Wed, 15 Aug 2001 11:49:38 +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 LAA17478 for ; Wed, 15 Aug 2001 11:49:36 +0200 (MET DST) Received: from maties1.sun.ac.za (maties1.sun.ac.za [146.232.128.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f7F9nXf22549 for ; Wed, 15 Aug 2001 11:49:34 +0200 (MET DST) Received: from bywoner.sun.ac.za ([146.232.129.121]) by maties1.sun.ac.za with esmtp (Exim 3.31 #1) id 15WxIn-0007RK-00 for caml-list@inria.fr; Wed, 15 Aug 2001 11:49:29 +0200 Received: from js by bywoner.sun.ac.za with local (Exim 3.22 #1 (Debian)) id 15WxJB-00014M-00 for ; Wed, 15 Aug 2001 11:49:53 +0200 To: ocaml mailing list Subject: [Caml-list] Printf.sprintf ? From: Johann Spies Date: 15 Aug 2001 11:49:53 +0200 Message-ID: <87r8udirem.fsf@bywoner.sun.ac.za> User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Can somebody please explain this to me: This works as expected: # let s = Printf.sprintf "%s" "enigiets";; val s : string = "enigiets" But this not: # let q = "%s";; val q : string = "%s" # let s = Printf.sprintf q "enigiets";; Characters 23-24: This expression has type string but is here used with type (string -> 'a, unit, string) format Why? Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Praying always with all prayer and supplication in the Spirit, and watching thereunto with all perseverance and supplication for all saints." Ephesians 6:18 ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr