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
Request for comments: Printf list conversion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bill Wood <william.wood3@c...>
Subject: Re: [Caml-list] Request for comments: Printf list conversion
On Thu, 2006-01-12 at 17:39 +0000, Richard Jones wrote:
   . . .
> If you just want to dump out data structures (for debugging, for
> example) then you might want to take a look at the Std.dump function
> in Extlib:
> Or:
> Of course this isn't suitable for end user reports.

This is good to know, but I'm talking about situations where I need more
structured output.  For example, I wrote a scheduling program for an
organization I belonged to, and found it convenient to output the
results as a LaTeX table.  So there was pre-matter boiler plate, then
the table, and finally post-matter boiler plate.  The results of the
scheduler were produced as a list of lists, where each member list had
an item for each column of the table.  A single (format...) form
consumed the results and wrote out the table.  All I had to do was run
the program, then run latex, and finally pipe the output of dvips to my
printer.  Of course, a major part of the convenience was that *I didn't
have to write the formatter*.

 -- Bill Wood