summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/printf.mli9
-rw-r--r--stdlib/scanf.mli12
2 files changed, 8 insertions, 13 deletions
diff --git a/stdlib/printf.mli b/stdlib/printf.mli
index 739a474d2..a4d0ba989 100644
--- a/stdlib/printf.mli
+++ b/stdlib/printf.mli
@@ -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.
diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli
index 7a2c65a2b..8f7d89cf2 100644
--- a/stdlib/scanf.mli
+++ b/stdlib/scanf.mli
@@ -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.