diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2003-05-14 17:52:40 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2003-05-14 17:52:40 +0000 |
commit | 0df4ab03925b104c3093ffec31332fc5557a42f1 (patch) | |
tree | 3d23cd379a3279a57777f306efbbed02b6af9c79 /stdlib/printf.mli | |
parent | b5609e8619a1b7fa7dc5869ea2926a5bd9a0746d (diff) |
Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5567 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/printf.mli')
-rw-r--r-- | stdlib/printf.mli | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/stdlib/printf.mli b/stdlib/printf.mli index cf1be6c0a..ce83977b2 100644 --- a/stdlib/printf.mli +++ b/stdlib/printf.mli @@ -65,19 +65,11 @@ val fprintf : out_channel -> ('a, out_channel, unit, unit) format -> 'a [out_channel -> unit]) and apply it to [outchan]. - [$]: variable substitution in strings. Takes two arguments: a function mapping from variable names to string values and a - string pattern. After proper substitution, outputs the resulting - string pattern. The substitution process looks for variables into - the pattern and substitutes each variable name by its value, as - obtained by applying the mapping to the variable name. Inside the - string pattern, a variable name immediately follows a non-escaped - [$] character and is one of the following: - - a non empty sequence of alphanumeric or [_] characters, - - an arbitrary sequence of characters enclosed by a pair of - matching parentheses or curly brackets. - An escaped [$] character is a [$] immediately preceded by a backslash - character. Into the string pattern, an escaped [$] character is - equivalent to any other [$] character that does not introduce a - variable name: it stands for a plain [$] character. + string pattern where any identifier following a dollar sign is + considered a variable name. Each variable name is replaced by its + value as specified by the mapping, and the resulting string + pattern is inserted in the output. See {!Buffer.add_substitute} for + details on variable syntax. - [!]: take no argument and flush the output. - [%]: take no argument and output one [%] character. |