summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2003-05-14 06:39:50 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2003-05-14 06:39:50 +0000
commit3b1652c76c6f5b2aee2ff691583e59fc2c31b1a8 (patch)
tree796a271660771c97b317ba0f50ba9eaec09a51db /stdlib
parentf1217b8bc716d838a2e4d778fa1c142b17419395 (diff)
Explicit documentation of %0c: scanf "%0c" (fun c -> ...) gives access
to the current character without reading it. This is convenient to continue scanning according to the value of the current character, without having the burden to add it to the scanning result (if only possible when you decide to scan %C or %S when c is " or '). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5562 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/scanf.mli4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli
index c9f359d94..c58e7d661 100644
--- a/stdlib/scanf.mli
+++ b/stdlib/scanf.mli
@@ -117,7 +117,9 @@ val bscanf :
- [s]: reads a string argument (by default strings end with a space).
- [S]: reads a delimited string argument (delimiters and special
escaped characters follow the lexical conventions of Caml).
- - [c]: reads a single character.
+ - [c]: reads a single character. To test the current input character
+ without reading it, specify a null field width, i.e. use
+ specification [%0c].
- [C]: reads a single delimited character (delimiters and special
escaped characters follow the lexical conventions of Caml).
- [f], [e], [E], [g], [G], [F]: reads an optionally signed