summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2002-09-05 10:38:11 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2002-09-05 10:38:11 +0000
commita96f8f0e87c47e0ec61ac0829ce98db10a97740a (patch)
tree55d22a040f00a4dadb8bda4dad58e7f416a7b5d9 /stdlib
parent642e2919bab499359772ccb1db1b803cc6f90669 (diff)
downloadocaml-a96f8f0e87c47e0ec61ac0829ce98db10a97740a.tar.gz
Formats %B and %F.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/scanf.ml4
-rw-r--r--stdlib/scanf.mli7
2 files changed, 6 insertions, 5 deletions
diff --git a/stdlib/scanf.ml b/stdlib/scanf.ml
index a6fca39707..4b383ec6fc 100644
--- a/stdlib/scanf.ml
+++ b/stdlib/scanf.ml
@@ -542,7 +542,7 @@ let kscanf ib ef fmt f =
| 'd' | 'i' | 'o' | 'u' | 'x' | 'X' as conv ->
let x = scan_int conv max ib in
scan (stack f (token_int conv ib)) (i + 1)
- | 'f' | 'g' | 'G' | 'e' | 'E' ->
+ | 'f' | 'g' | 'G' | 'e' | 'E' | 'F' ->
let x = scan_float max ib in
scan (stack f (token_float ib)) (i + 1)
| 's' ->
@@ -557,7 +557,7 @@ let kscanf ib ef fmt f =
| 'S' ->
let x = scan_String max ib in
scan (stack f (token_string ib)) (i + 1)
- | 'b' ->
+ | 'b' | 'B' ->
let x = scan_bool max ib in
scan (stack f (token_bool ib)) (i + 1)
| 'l' | 'n' | 'L' as t ->
diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli
index 86dd9d6b44..00b3aa0b24 100644
--- a/stdlib/scanf.mli
+++ b/stdlib/scanf.mli
@@ -91,9 +91,10 @@ val bscanf :
- [c]: reads a single character.
- [C]: reads a single delimited character (delimiters and special
escaped characters follow the lexical conventions of Caml).
- - [f], [e], [E], [g], [G]: reads an optionally signed floating-point number
- in decimal notation, in the style [dddd.ddd e/E+-dd].
- - [b]: reads a boolean argument ([true] or [false]).
+ - [f], [e], [E], [g], [G], [F]: reads an optionally signed
+ floating-point number in decimal notation, in the style [dddd.ddd
+ e/E+-dd].
+ - [b], [B]: reads a boolean argument ([true] or [false]).
- [ld], [li], [lu], [lx], [lX], [lo]: reads an [int32] argument to
the format specified by the second letter (decimal, hexadecimal, etc).
- [nd], [ni], [nu], [nx], [nX], [no]: reads a [nativeint] argument to