SBCL: List of format control directives

Discussion of Common Lisp
Post Reply
mcc
Posts: 18
Joined: Fri Mar 27, 2015 10:47 pm

SBCL: List of format control directives

Post by mcc » Wed Apr 08, 2015 8:06 pm

Hi,

I am playing around with the format command. It seems to be the
older brother of Cs "printf()"-function ;)

I am searching for understandable and possibly complete list of the
format control directives (and I hope I have googled this term
correctly...what I mean is "everything which is not plain text" to
format the output of format.

In "Practical Common Lisp" I found some recipies but no plain
list of such directives.
HYPERSPEC is (sorry) not something I would like to call "readable"... ;)
HYPERSPEC seems to have more hyperlinks than bare characters... ;) ;) ;)

A more comprehensive list I found here:
http://www.gnu.org/software/kawa/Format.html
...but only to figure out that THAT is Scheme, not Common Lisp...<sigh>

Where can I find such a list?

Thank you very much in advance for any help!
Best regards,
mcc

edgar-rft
Posts: 226
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

Re: SBCL: List of format control directives

Post by edgar-rft » Wed Apr 08, 2015 11:50 pm

mcc wrote:HYPERSPEC is (sorry) not something I would like to call "readable"...
The Hyperspec is formatted to be read with Emacs-w3m, not with Firefox.

The format controls in the Hyperspec are in Chapter 22.3: Formatted Output and sub-chapters, linked near the bottom of that page.

Common Lisp the Language 2nd Edition (CLtL2), Chapter 22.3.3: Formatted Output to Character Streams has all format controls on a single page, but CLtL2 is pre-ANSI and I don't know how much it differs from the ANSI specification.

http://quimby.gnus.org/circus/cl/dpANS3/ has all Tex files of the ANSI Common Lisp Specification. In the same directory there is a set of Z-compressed DVI files that can be used to generate PDF documents. This may be easier to read, but doesn't contain the code examples from the Hyperspec.

mcc
Posts: 18
Joined: Fri Mar 27, 2015 10:47 pm

Re: SBCL: List of format control directives

Post by mcc » Thu Apr 09, 2015 10:33 am

Hi Edgar,

thanks again for your very helpful posting! :)

Best regards,
mcc

sylwester
Posts: 133
Joined: Mon Jul 11, 2011 2:53 pm

Re: SBCL: List of format control directives

Post by sylwester » Sat May 09, 2015 1:12 pm

In the book Practical Common Lisp you have the chapter A few FORMAT recipes

It's not a documentation but some receipes for a bunch of scenarios that usually comes up. I haven't tried to understand it all myself but I use this regulary.
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p

Post Reply