diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2009-09-11 16:16:44 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2009-09-11 16:16:44 +0000 |
commit | 7be229fab34af1e43b5c6a64cdf7fb05f8ca0e0f (patch) | |
tree | 0fe07dff0e89103f34bbd208757da29939a46f82 | |
parent | 714d968b849f98ecdfab1d993492bdea865caa2f (diff) |
Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9330 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | stdlib/scanf.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/scanf.ml b/stdlib/scanf.ml index da67cb5ba..6f3ad9e3c 100644 --- a/stdlib/scanf.ml +++ b/stdlib/scanf.ml @@ -210,7 +210,7 @@ let default_token_buffer_size = 1024;; let create fname next = { eof = false; - current_char = '\000'; + current_char = null_char; current_char_is_valid = false; char_count = 0; line_count = 0; @@ -1098,17 +1098,17 @@ let ascanf sc fmt = - an input buffer [ib] from which to read characters, - an error handling function [ef], - a format [fmt] that specifies what to read in the input, - - a vector of user's defined readers rv, + - a vector of user's defined readers [rv], - and a function [f] to pass the tokens read to. Then [scan_format] scans the format and the input buffer in parallel to - find out tokens as specified by the format; when it founds one token, it + find out tokens as specified by the format; when it finds one token, it converts it as specified, remembers the converted value as a future argument to the function [f], and continues scanning. If the entire scanning succeeds (i.e. the format string has been exhausted and the buffer has provided tokens according to the - format string), [f] is applied to the tokens. + format string), [f] is applied to the tokens read. If the scanning or some conversion fails, the main scanning function aborts and applies the scanning buffer and a string that explains |