it works in interactive mode. but got some problems in file driver.ml
printf "%B" ! ast
error info:
File "driver.ml ", line 62, characters 8-12:
This expression has type
(bool -> 'a -> 'b -> 'c, out_channel, unit, 'a -> 'b -> 'c) format4
but is here used with type
(bool -> 'a -> 'b -> 'c, out_channel, unit) format =
(bool -> 'a -> 'b -> 'c, out_channel, unit, unit) format4
"
let ast = ref false
let print_ast() = !ast
On 5/1/07, Fabrice Marchant < fabrice.marchant%40orange.fr">fabrice.marchant
orange.fr> wrote:
>
> > How to printf a ref of a bool? like ast and print_ast() here.
> >
> > print a ref of bool let ast = ref false
> > let print_ast() = !ast
> >
> > printf "%B" ast;;
>
> Maybe with a "!" before ast :
> Printf.printf "%B" !ast;;
>
>
>
[Non-text portions of this message have been removed]
.