Documentation.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7049 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Pierre Weis 2005-09-13 15:44:02 +00:00
parent 026ff6d482
commit 564969e68c
2 changed files with 8 additions and 13 deletions

View File

@ -66,12 +66,9 @@ val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a
- [t]: same as [%a], but takes only one argument (with type
[out_channel -> unit]) and apply it to [outchan].
- [\{ fmt %\}]: convert a format string argument to its minimal
specification. The argument must match the internal format string
specification [fmt] that enumerates the conversion specification
sequence that defines the format type of the argument.
- [\( fmt %\)]: printing format insertion. This convertion takes a
format string argument and substitutes it to the specification
[fmt] to print the following arguments.
specification. The argument must have the same type as [fmt].
- [\( fmt %\)]: printing format substitution. Use a format string
argument to replace [fmt]. The argument must have the same type as [fmt].
- [!]: take no argument and flush the output.
- [%]: take no argument and output one [%] character.

View File

@ -150,17 +150,15 @@ val bscanf :
first character of the range (or just after the [^] in case of
range negation); hence [\[\]\]] matches a [\]] character and
[\[^\]\]] matches any character that is not [\]].
- [\{ fmt %\}]: reads a format string that must have the same
type as the format string [fmt].
The argument is read according to the lexical conventions for
format strings described here.
- [\{ fmt %\}]: reads a format string argument to the format
specified by the internal format [fmt]. The format string to be
read must have the same type as the internal format [fmt].
For instance, "%\{%i%\}" reads any format string that can read a value of
type [int]; hence [Scanf.sscanf "fmt:\\\"number is %u\\\"" "fmt:%\{%i%\}"]
succeeds and returns the format string ["number is %u"].
- [\( fmt %\)]: scanning format substitution.
This conversion specifies a format string that should be read in the
input to replace [fmt]. The format string read must have the same
type as [fmt].
Reads a format string to replace [fmt]. The format string read
must have the same type as [fmt].
- [l]: applies [f] to the number of lines read so far.
- [n]: applies [f] to the number of characters read so far.
- [N] or [L]: applies [f] to the number of tokens read so far.