Browse thread
Request for comments: Printf list conversion
[
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: | 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: > > http://cvs.sourceforge.net/viewcvs.py/ocaml-lib/extlib-dev/std.mli?rev=1.15&view=markup > > Or: http://merjis.com/developers/dumper > > 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