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 TAA24386; Fri, 12 Oct 2001 19:36:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA24139 for ; Fri, 12 Oct 2001 19:36:04 +0200 (MET DST) Received: from alan-schm1p.inria.fr (adsl166-99.mangoosta.fr [217.11.166.99]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f9CHZxD26099 for ; Fri, 12 Oct 2001 19:36:03 +0200 (MET DST) Received: by alan-schm1p.inria.fr (Postfix, from userid 11207) id ECE8323646; Fri, 12 Oct 2001 19:31:00 +0200 (CEST) Date: Fri, 12 Oct 2001 19:31:00 +0200 From: Alan Schmitt To: caml-list@inria.fr Subject: Re: [Caml-list] Printf: variable field width/precision Message-ID: <20011012193100.G1899@alan-schm1p> Mail-Followup-To: caml-list@inria.fr References: <200110081609.f98G9T131189@heplix4.ikp.physik.tu-darmstadt.de> <20011012162347.D18676@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011012162347.D18676@pauillac.inria.fr>; from xavier.leroy@inria.fr on ven, oct 12, 2001 at 04:23:47 +0200 X-Editor: Vim http://vim.sf.net/ X-Info: http://pauillac.inria.fr/~aschmitt/ X-Operating-System: Linux/2.4.7 (i686) X-Uptime: 7:28pm up 2 days, 17:36, 1 user, load average: 0.02, 0.03, 0.02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk * Xavier Leroy (xavier.leroy@inria.fr) wrote: > > In the C library, printf(3) supports variable field widths and > > precisions with the `*' specifier. > > Unfortunately, neither the O'Caml library nor the compiler accept `*'. > > If the `*' form is available, the `*m$' form is hardly needed, but I > > couldn't find a way to hack around the missing `*' (handling every > > conceivable width/precision pair as a special case doesn't count ...). > > > > Is there are chance that variable field widths for the benefit of > > numerical programs will be supported in the future? > > I've never needed the '*' specifier so far, but I agree this should be > supported at some point. As far as I can say, this requires a bit of > work, though. By the way, it also seems that the + format is not supported either: # Printf.printf "%+f" 2. ;; Bad format `%+' Alan -- The hacker: someone who figured things out and made something cool happen. ------------------- 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