Next: srfi intermediate-format spec, Previous: srfi intermediate-format issue, Up: srfi intermediate-format [Index]
Inheriting from MacLisp, nearly all Lisp and Scheme implementations
support some form of format
function with support for various
numbers of format directives. By agreeing to the options here, we raise
the bar for portable code.
The reference implementation is R5RS compliant and easy to port. In
not requiring advanced features (aside from ~W
and ~F
)
small implementations are possible. E.g. the reference code does not
use side effects (assignment) and is less than a third the source size
of the latest SLIB implementation of format
(less than a tenth if
~F
support is elided).
The optional port argument allows for compatibility with older code written for, e.g. scheme48, MIT Scheme, T, et cetera, which required a port argument. It is also useful in cases where a synoptic implementation of Scheme and CommonLisp is maintained.