summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>1997-02-26 15:02:26 +0000
committerPierre Weis <Pierre.Weis@inria.fr>1997-02-26 15:02:26 +0000
commit9d9b6d5023c619526518fae28fc95c2f6ba10af3 (patch)
tree4746023229034acfd2656fa2917695f7776e58d9 /stdlib
parent8fc33f2cabfd1de6b788b18d057a7da90dab6581 (diff)
Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/format.mli18
1 files changed, 12 insertions, 6 deletions
diff --git a/stdlib/format.mli b/stdlib/format.mli
index cea6739b5..69ffb9fe2 100644
--- a/stdlib/format.mli
+++ b/stdlib/format.mli
@@ -2,7 +2,7 @@
(* *)
(* Objective Caml *)
(* *)
-(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
+(* Pierre Weis, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* Automatique. Distributed only by permission. *)
@@ -20,9 +20,10 @@
(* Rule of thumb for casual users:
use simple boxes (as obtained by [open_box 0]);
- use simple break hints (as obtained by [print_cut ()] or by
- [print_space ()] that ouputs a space);
- once a box is opened, display material with basic printing
+ use simple break hints (as obtained by [print_cut ()] that outputs a
+ simple break hint, or by [print_space ()] that ouputs a space
+ indicating a break hint);
+ once a box is opened, display its material with basic printing
functions (e. g. [print_int] and [print_string]);
when the material for a box has been printed, call [close_box ()] to
close the box;
@@ -207,12 +208,13 @@ val get_formatter_output_functions :
unit -> (string -> int -> int -> unit) * (unit -> unit);;
(* Return the current output functions of the pretty-printer. *)
+(*** Multiple formatted output *)
type formatter;;
(* Abstract data type corresponding to a pretty-printer and
all its machinery.
Defining new pretty-printers permits the output of
material in parallel on several channels.
- Parameters of the pretty-printer are local to the prety-printer:
+ Parameters of the pretty-printer are local to the pretty-printer:
margin, maximum indentation limit, maximum number of boxes
simultaneously opened, ellipsis, and so on, are specific to
each pretty-printer and may be fixed independantly. *)
@@ -263,4 +265,8 @@ val pp_set_formatter_output_functions : formatter ->
(string -> int -> int -> unit) -> (unit -> unit) -> unit;;
val pp_get_formatter_output_functions :
formatter -> unit -> (string -> int -> int -> unit) * (unit -> unit);;
- (* The basic functions to use with formatters. *)
+ (* The basic functions to use with formatters.
+ These functions are the basic ones: usual functions
+ operating on the standard formatter are defined via partial
+ evaluation of these primitives. For instance,
+ [print_string] is equal to [pp_print_string std_formatter]. *)