stktrc@yahoo.com writes:
> sgelkins@bellsouth.net (Steve Elkins) writes:
>
> > stktrc@yahoo.com writes:
> >
> >> What options are there to do printf type formatting in scsh?
> >
> > Have you seen format.scm? If not, spend some time poking around in
> > the distribution. Doing so sooner would've saved me some work.
>
> I've seen format, but it does not provide for padding the output to
> fixed widths (like printf("%8d") for a width of 8) to allow for
> printing data in pretty columns, which is what I'm looking for.
format.scm represents an implementation of modest subset of Common
Lisp's format. A more complete implementation can be found in Aubrey
Jaffer's SLIB.
>From the SCSH FAQ:
Can I use SLIB (a Scheme library) with scsh?
============================================
Yes, provided that you get (or write) an initialization file for
scsh. Tomas By wrote one that you can get there:
`ftp://ftp.dcs.shef.ac.uk/home/tomas/scsh.init'
By the way, more information about SLIB is available by following
this URL:
`http://www-swiss.ai.mit.edu/~jaffer/SLIB.html'
More about CL format at:
http://www.lispworks.com/reference/HyperSpec/Body/22_c.htm
and
http://www.lispworks.com/reference/HyperSpec/Body/f_format.htm#format
IIRC, SLIB even implements some sort of printf, complete with the
c-style syntax. The SLIB manual is online at the link given in the FAQ
quip.
--
George Demmy
|