[Prev][Next][Index][Thread]

Re: How can I..



In article <952945860.478696@ham.ihug.co.nz>, "Joe Chiao"
<ikjoe@ihug.co.nz> wrote:

> I want to know how to produce nicely formatted output with Dylan. Such as
> left/ right/ centre justify, control column width and numeric formats.
> Is there anyone who can help me about this?
> Joe

There is a library function called "format" which formats output onto a
stream, and also format-out which is the same but outputs specifically to
stdout.  I think this has been agreed on by both the Functional Objects
people and the Gwydion people.

The basic idea is the same as C's "printf", and in fact the format strings
are very similar.  Unfortunately this doesn't appear to be well
documented, at lrast in the Gwydion project.  Perhaps Fun-O have better
documentation?

It *should* be documented (for Gwydion) at...

<http://www.gwydiondylan.org/gdref/gdlibs.html#LIBS-FORMAT>

... but there is very little there.  Feel free to write something
authoritative and submit it if you figure it out!

There is older documentation (I don't know how accurate) at...

<http://www.gwydiondylan.org/old-docs/maker-out/format.htm#E8E60>


The ultimate authority is of course the source code.  You can find it at...

<http://www.ccc.de/cgi-bin/cvsweb/gd/src/common/format/format.dylan?rev=1.2>


-- Bruce



References: