Introducing kscanf, the scanning function that has an extra

continuation argument for scanning failures.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4949 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Pierre Weis 2002-06-26 09:31:02 +00:00
parent 9e3dc0cd97
commit 72d45abf8a
1 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,7 @@ val from_function : (unit -> char) -> scanbuf;;
end;;
exception Scan_failure of string;;
exception Scan_failure of Scanning.scanbuf * string;;
(** The exception that formatted input functions raise when the input
cannot be read according to the given format. *)
@ -129,3 +129,6 @@ val sscanf : string -> ('a, Scanning.scanbuf, 'b) format -> 'a -> 'b;;
val scanf : ('a, Scanning.scanbuf, 'b) format -> 'a -> 'b;;
(** Same as {!Scanf.bscanf}, but inputs from [stdin]. *)
val kscanf : Scanning.scanbuf -> ('a, 'b, 'c) format ->
'a -> (Scanning.scanbuf -> string -> 'c) -> 'c;;