Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
printf and positional specifier
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-11-12 (00:46)
From: Martin Jambon <martin1977@l...>
Subject: Re: [Caml-list] printf and positional specifier
On Sun, 12 Nov 2006, Anastasia Gornostaeva wrote:

> On Sat, Nov 11, 2006 at 09:15:37PM +0000, Peter Gregory wrote:
>> I take a different reading to you Martin, although I think it is
>> confusing.  I believe that the number specified before the dollar sign
>> is the argument that specifies the /precision/ of the output.
>> So, it is not to specify the argument to print, but the argument to use
>> as precision.  That said, I tried it in the context they suggest and I
>> couldn't make it work!
>> Ermine: do you have a situation where this is important?  I can't think
>> of any situation that comes to mind.
> For example:
> In fact I have my own module for translations and i'm interesting in this
> printf's feature.

OK, so you really want to invert the order of the arguments :-)

You might want to use a syntax extension like xstrp4 or 


Martin Jambon, PhD