1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
4
<link rel="stylesheet" href="style.css" type="text/css">
5
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
4
6
<link rel="Start" href="index.html">
5
7
<link rel="previous" href="Filename.html">
6
8
<link rel="next" href="Gc.html">
66
68
<link title="Sys" rel="Chapter" href="Sys.html">
67
69
<link title="Thread" rel="Chapter" href="Thread.html">
68
70
<link title="ThreadUnix" rel="Chapter" href="ThreadUnix.html">
71
<link title="Tk" rel="Chapter" href="Tk.html">
69
72
<link title="Unix" rel="Chapter" href="Unix.html">
70
73
<link title="UnixLabels" rel="Chapter" href="UnixLabels.html">
71
74
<link title="Weak" rel="Chapter" href="Weak.html"><link title="Boxes" rel="Section" href="#6_Boxes">
108
111
<a href="http://caml.inria.fr/resources/doc/guides/format.html">http://caml.inria.fr/resources/doc/guides/format.html</a>.
111
Warning: the material output by the following functions is delayed
112
in the pretty-printer queue in order to compute the proper line
113
breaking. Hence, you should not mix calls to the printing functions
114
of the basic I/O system with calls to the functions of this module:
115
this could result in some strange output seemingly unrelated with
116
the evaluation order of printing commands.
119
114
You may consider this module as providing an extension to the
120
115
<code class="code">printf</code> facility to provide automatic line breaking. The addition of
121
116
pretty-printing annotations to your regular <code class="code">printf</code> formats gives you
159
154
In case of interactive use, the system closes all opened boxes and
160
155
flushes all pending text (as with the <code class="code">print_newline</code> function)
161
156
after each phrase. Each phrase is therefore executed in the initial
162
state of the pretty-printer.<br>
157
state of the pretty-printer.
160
Warning: the material output by the following functions is delayed
161
in the pretty-printer queue in order to compute the proper line
162
breaking. Hence, you should not mix calls to the printing functions
163
of the basic I/O system with calls to the functions of this module:
164
this could result in some strange output seemingly unrelated with
165
the evaluation order of printing commands.<br>
163
166
<hr width="100%">
165
168
<a name="6_Boxes"></a>
652
655
<code class="code">nspaces</code> and <code class="code">offset</code> parameters of the break may be
653
656
optionally specified with the following syntax:
654
657
the <code class="code"><</code> character, followed by an integer <code class="code">nspaces</code> value,
655
then an integer offset, and a closing <code class="code">></code> character.
658
then an integer <code class="code">offset</code>, and a closing <code class="code">></code> character.
656
659
If no parameters are provided, the good break defaults to a
658
661
<li><code class="code">@?</code>: flush the pretty printer as with <code class="code">print_flush ()</code>.
715
718
pretty-printer queue would result in unexpected and badly formatted
718
<pre><span class="keyword">val</span> <a name="VALkfprintf"></a>kfprintf : <code class="type">(<a href="Format.html#TYPEformatter">formatter</a> -> 'a) -><br> <a href="Format.html#TYPEformatter">formatter</a> -> ('b, <a href="Format.html#TYPEformatter">formatter</a>, unit, 'a) format4 -> 'b</code></pre><div class="info">
721
<pre><span class="keyword">val</span> <a name="VALkfprintf"></a>kfprintf : <code class="type">(<a href="Format.html#TYPEformatter">formatter</a> -> 'a) -><br> <a href="Format.html#TYPEformatter">formatter</a> -> ('b, <a href="Format.html#TYPEformatter">formatter</a>, unit, 'a) <a href="Pervasives.html#TYPEformat4">format4</a> -> 'b</code></pre><div class="info">
719
722
Same as <code class="code">fprintf</code> above, but instead of returning immediately,
720
723
passes the formatter to its first argument at the end of printing.<br>
722
<pre><span class="keyword">val</span> <a name="VALksprintf"></a>ksprintf : <code class="type">(string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b</code></pre><div class="info">
725
<pre><span class="keyword">val</span> <a name="VALifprintf"></a>ifprintf : <code class="type"><a href="Format.html#TYPEformatter">formatter</a> -> ('a, <a href="Format.html#TYPEformatter">formatter</a>, unit) <a href="Pervasives.html#TYPEformat">format</a> -> 'a</code></pre><div class="info">
726
Same as <code class="code">fprintf</code> above, but does not print anything.
727
Useful to ignore some material when conditionally printing.<br>
729
<pre><span class="keyword">val</span> <a name="VALksprintf"></a>ksprintf : <code class="type">(string -> 'a) -> ('b, unit, string, 'a) <a href="Pervasives.html#TYPEformat4">format4</a> -> 'b</code></pre><div class="info">
723
730
Same as <code class="code">sprintf</code> above, but instead of returning the string,
724
731
passes it to the first argument.<br>
726
<pre><span class="keyword">val</span> <a name="VALkprintf"></a>kprintf : <code class="type">(string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b</code></pre><div class="info">
733
<pre><span class="keyword">val</span> <a name="VALkprintf"></a>kprintf : <code class="type">(string -> 'a) -> ('b, unit, string, 'a) <a href="Pervasives.html#TYPEformat4">format4</a> -> 'b</code></pre><div class="info">
727
734
A deprecated synonym for <code class="code">ksprintf</code>.<br>
b'\\ No newline at end of file'