22.8. Formatted Output [sec_22-3]

Function FORMAT

The additional FORMAT instruction ~! is similar to ~/, but avoids putting a function name into a string, thus it is READ in the current *PACKAGE*, so, even if the function is not interned in the COMMON-LISP-USER package, you might not need to specify the package explicitly. (FORMAT stream "~arguments!" function object) is equivalent to (FUNCALL function stream object colon-modifier-p atsign-modifier-p arguments).

The additional FORMAT instruction ~. is a kind of opposite to ~&: It outputs a conditional newline, by calling the function EXT:ELASTIC-NEWLINE. ~n. outputs n-1 newlines followed by an EXT:ELASTIC-NEWLINE. ~0. does nothing.

FORMAT ~R and FORMAT ~:R can output only integers in the range |n| < 1066. The output is in English, according to the American conventions, and these conventions are identical to the British conventions only in the range |n| < 109.

FORMAT ~:@C does not output the character itself, only the instruction how to type the character.

For FORMAT ~E and FORMAT ~G, the value of *READ-DEFAULT-FLOAT-FORMAT* does not matter if *PRINT-READABLY* is true.

FORMAT ~T can determine the current column of any built-in stream.


These notes document CLISP version 2.49.93+Last modified: 2018-02-19