Next: , Up: Basic Formatting   [Contents][Index]


6.4.3.1 General Directives

~A

The most general-purpose directive is ‘~A’, which consumes one format argument of any type and outputs it in aesthetic (human-readable) form: strings are output without quotation marks or escape characters, and numbers are output in a natural way for the type of number.

~S

~S’ tries to generate output that can be read back in with READ. Thus, strings will be enclosed in quotation marks, symbols will be package-qualified when necessary, and so on.

~:A’, ‘~:S

With a colon modifier, both the ‘~A’ and ‘~S’ directives emit ‘NIL’ as ‘()’ rather than ‘NIL’.

Prefix Parameters

Both the ‘~A’ and ‘~S’ directives also take up to four prefix parameters, which can be used to control whether padding is added after (or before with the at-sign modifier) the value, but those parameters are only really useful for generating tabular data.

~%

emits a newline

~&

emits a fresh line. The difference between the two is that ‘~%’ always emits a newline, while ‘~&’ emits one only if it’s not already at the beginning of a line.

Prefix Parameters

Both of these directives can take a single prefix parameter that specifies the number of newlines to emit.

~~

causes FORMAT to emit a literal tilde. Also takes a prefix parameter to determine how many to print.