[Top][All Lists]

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

Re: format equivalent of printf "%3.1f", "%03x"

From: Keith Wright
Subject: Re: format equivalent of printf "%3.1f", "%03x"
Date: Tue, 16 Oct 2001 11:46:25 -0400

> From: Chris Cramer <address@hidden>
> On Tue, Oct 16, 2001 at 01:33:54AM -0400, Keith Wright wrote:
> > Boy are you asking for flamage.  Ask again when you are ready for
> > a quiz on pages 581-608 of Common Lisp: The Language
> > by Guy L. Steele Jr. (Digital Press)
> Could you summarize for those of us who are not as familiar with Common
> Lisp? I have no idea what problems there could be with using something
> like printf with Lisp. Not that it's a burning desire of mine, since we
> already have format, but now you've got me wondering.

Well, no, not really.  The ice-9 printf is (with minor schemification
like using #f instead of nil) just an implementation of Common Lisp
format (I forgot to say that explicitly).  The specs for CL format
take more than 25 pages in Guy Steele's terse style.

In general, a format spec is a tilde, parameters separated by
commas, optional colon, optional at sign, and the format directive
character.  The info files in Guile enumerate the directives,
but are missing descriptions of what the arguments do.  Somebody
should fill that in, but I am not going to type it into this mail
message.  In general the first parameter is often (not always)
the minimum width.  Character parameters are preceded by a single

     -- Keith Wright  <address@hidden>

Programmer in Chief, Free Computer Shop <>
         ---  Food, Shelter, Source code.  ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]