Browse thread
printf and positional specifier
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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: > http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC18 > > 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 heredoc. http://www.ocaml-programming.de/packages/documentation/xstrp4/ http://www.eleves.ens.fr/home/frisch/info/HereDoc.html Martin -- Martin Jambon, PhD http://martin.jambon.free.fr