Debian Codegraph @

info/gcl/formatter.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>formatter (ANSI and GNU Common Lisp Document)</title>
7
8 <meta name="description" content="formatter (ANSI and GNU Common Lisp Document)">
9 <meta name="keywords" content="formatter (ANSI and GNU Common Lisp Document)">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
13 <link href="index.html" rel="start" title="Top">
14 <link href="Printer-Dictionary.html" rel="up" title="Printer Dictionary">
15 <link href="pprint_002ddispatch.html" rel="next" title="pprint-dispatch">
16 <link href="copy_002dpprint_002ddispatch.html" rel="prev" title="copy-pprint-dispatch">
17 <style type="text/css">
18 <!--
19 a.summary-letter {text-decoration: none}
20 blockquote.indentedblock {margin-right: 0em}
21 div.display {margin-left: 3.2em}
22 div.example {margin-left: 3.2em}
23 div.lisp {margin-left: 3.2em}
24 kbd {font-style: oblique}
25 pre.display {font-family: inherit}
26 pre.format {font-family: inherit}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 span.nolinebreak {white-space: nowrap}
30 span.roman {font-family: initial; font-weight: normal}
31 span.sansserif {font-family: sans-serif; font-weight: normal}
32 ul.no-bullet {list-style: none}
33 -->
34 </style>
35
36
37 </head>
38
39 <body lang="en">
40 <span id="formatter"></span><div class="header">
41 <p>
42 Next: <a href="pprint_002ddispatch.html" accesskey="n" rel="next">pprint-dispatch</a>, Previous: <a href="copy_002dpprint_002ddispatch.html" accesskey="p" rel="prev">copy-pprint-dispatch</a>, Up: <a href="Printer-Dictionary.html" accesskey="u" rel="up">Printer Dictionary</a> &nbsp; </p>
43 </div>
44 <hr>
45 <span id="formatter-_005bMacro_005d"></span><h4 class="subsection">22.4.2 formatter [Macro]</h4>
46
47 <p><code>formatter</code> <i>control-string</i> &rArr; <i>function</i>
48 </p>
49 <span id="Arguments-and-Values_003a_003a-456"></span><h4 class="subsubheading">Arguments and Values::</h4>
50
51 <p><i>control-string</i>&mdash;a <i>format string</i>; not evaluated.
52 </p>
53 <p><i>function</i>&mdash;a <i>function</i>.
54 </p>
55 <span id="Description_003a_003a-590"></span><h4 class="subsubheading">Description::</h4>
56
57 <p>Returns a <i>function</i> which has behavior equivalent to:
58 </p>
59 <div class="example">
60 <pre class="example"> #'(lambda (*standard-output* &amp;rest arguments)
61 (apply #'format t <i>control-string</i> arguments)
62 <i>arguments-tail</i>)
63 </pre></div>
64
65 <p>where <i>arguments-tail</i> is either the tail of <i>arguments</i>
66 which has as its <i>car</i> the argument that would be processed next
67 if there were more format directives in the <i>control-string</i>,
68 or else <b>nil</b> if no more <i>arguments</i> follow the most recently
69 processed argument.
70 </p>
71 <span id="Examples_003a_003a-428"></span><h4 class="subsubheading">Examples::</h4>
72
73 <div class="example">
74 <pre class="example">(funcall (formatter &quot;~&amp;~A~A&quot;) *standard-output* 'a 'b 'c)
75 <tt> |&gt; </tt> AB
76 &rArr; (C)
77
78 (format t (formatter &quot;~&amp;~A~A&quot;) 'a 'b 'c)
79 <tt> |&gt; </tt> AB
80 &rArr; NIL
81 </pre></div>
82
83 <span id="Exceptional-Situations_003a_003a-218"></span><h4 class="subsubheading">Exceptional Situations::</h4>
84
85 <p>Might signal an error (at macro expansion time or at run time) if the argument
86 is not a valid <i>format string</i>.
87 </p>
88 <span id="See-Also_003a_003a-480"></span><h4 class="subsubheading">See Also::</h4>
89
90 <p><a href="format.html">format</a>
91 </p>
92
93
94
95 </body>
96 </html>