Browse thread
[Caml-list] Printf: variable field width/precision
-
Thorsten Ohl
-
Xavier Leroy
- Alan Schmitt
-
Xavier Leroy
[
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: | -- (:) |
| From: | Alan Schmitt <alan.schmitt@i...> |
| Subject: | Re: [Caml-list] Printf: variable field width/precision |
* 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