1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 18:20:22 +02:00
This commit is contained in:
Andy Wingo 2015-01-22 13:24:30 +01:00
commit a5b5cb422e
10 changed files with 172 additions and 49 deletions

View file

@ -38,6 +38,7 @@ get the relevant SRFI documents from the SRFI home page
* SRFI-23:: Error reporting
* SRFI-26:: Specializing parameters
* SRFI-27:: Sources of Random Bits
* SRFI-28:: Basic format strings.
* SRFI-30:: Nested multi-line block comments
* SRFI-31:: A special form `rec' for recursive evaluation
* SRFI-34:: Exception handling.
@ -3269,6 +3270,42 @@ reasonably small value (related to the width of the mantissa of an
efficient number format).
@end defun
@node SRFI-28
@subsection SRFI-28 - Basic Format Strings
@cindex SRFI-28
SRFI-28 provides a basic @code{format} procedure that provides only
the @code{~a}, @code{~s}, @code{~%}, and @code{~~} format specifiers.
You can import this procedure by using:
@lisp
(use-modules (srfi srfi-28))
@end lisp
@deffn {Scheme Procedure} format message arg @dots{}
Returns a formatted message, using @var{message} as the format string,
which can contain the following format specifiers:
@table @code
@item ~a
Insert the textual representation of the next @var{arg}, as if printed
by @code{display}.
@item ~s
Insert the textual representation of the next @var{arg}, as if printed
by @code{write}.
@item ~%
Insert a newline.
@item ~~
Insert a tilde.
@end table
This procedure is the same as calling @code{simple-format} (@pxref{Writing})
with @code{#f} as the destination.
@end deffn
@node SRFI-30
@subsection SRFI-30 - Nested Multi-line Comments
@cindex SRFI-30