From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E29D9BC0A for ; Thu, 24 May 2007 13:36:07 +0200 (CEST) Received: from smeltpunt.science.ru.nl (smeltpunt.science.ru.nl [131.174.16.145]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4OBa7nT031893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 24 May 2007 13:36:07 +0200 Received: from tandem.cs.ru.nl [131.174.142.18] (helo=tandem.cs.ru.nl) by smeltpunt.science.ru.nl (8.13.7/5.11) with ESMTP id l4OBa64k009566 for ; Thu, 24 May 2007 13:36:06 +0200 (MEST) Received: from tews by tandem.cs.ru.nl with local (Exim 4.63) (envelope-from ) id 1HrBc5-0007uy-4G for caml-list@inria.fr; Thu, 24 May 2007 13:36:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18005.30893.97417.735516@tandem.cs.ru.nl> Date: Thu, 24 May 2007 13:36:13 +0200 To: caml-list@inria.fr Subject: positional specifiers in format strings X-Mailer: VM 7.19 under Emacs 21.4.1 From: Hendrik Tews X-Scanned-By: MIMEDefang 2.56 on 131.174.16.145 X-Miltered: at discorde with ID 465578A7.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; hendrik:01 tews:01 tews:01 printf:01 printf:01 hendrik:01 char:01 char:01 strings:01 strings:01 caml:02 objective:02 output:02 btw:02 string:02 Hi, the positional specifiers in format strings don't work as described. Both "%5$f" and "%.*3$f" are valid format strings according to the docs, however: Objective Caml version 3.10.0 # Printf.printf "%5$f";; Bad conversion %$, at char number 0 in format string ``%5$f'' # Printf.printf "%.*3$f";; Bad conversion %3, at char number 0 in format string ``%.*3$f'' [BTW, the manual says "For instance, %.*3$f prints a float with ..." -- I don't see any float in the output produced ;-)] Could somebody explain how to use the positional specifiers? Bye, Hendrik