Too optimistic implementation of %F format: we have to do the all job on
the Caml side. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
ccd4123e89
commit
66f225a7bf
|
@ -113,8 +113,10 @@ let scan_format fmt pos cont_s cont_a cont_t =
|
|||
cont_s (format_int (extract_format fmt pos i widths) n) (succ i))
|
||||
| 'f' | 'e' | 'E' | 'g' | 'G' | 'F' as conv ->
|
||||
Obj.magic(fun (f: float) ->
|
||||
let s = format_float (extract_format fmt pos i widths) f in
|
||||
cont_s (if conv = 'F' then valid_float_lexem s else s) (succ i))
|
||||
let s =
|
||||
if conv = 'F' then string_of_float f else
|
||||
format_float (extract_format fmt pos i widths) f in
|
||||
cont_s s (succ i))
|
||||
| 'b' | 'B' ->
|
||||
Obj.magic(fun (b: bool) ->
|
||||
cont_s (string_of_bool b) (succ i))
|
||||
|
|
Loading…
Reference in New Issue