Hi there,

Recently I started to use the Format module's support for custom tags (in order to print XML). I noticed a somehow strange behavior (at least it seems strange to me). What follows is a minimal example:

First enable tag printing via

  # Format.set_tags true;;
  - : unit = ()

Now consider the printing function

  # let f fmt = Format.fprintf fmt "@{<test>t...@}";;
  val f : Format.formatter -> unit = <fun>

When used on std_formatter it produces what I expected, namely

  # f Format.std_formatter;;
  <test>test</test>- : unit = ()

On str_formatter however the result is different.

  # f Format.str_formatter;;
  - : unit = ()
  # Format.flush_str_formatter();;
  - : string = "test"

Where have my tags gone? What am I missing here?

thnx for any help

cheers

christian

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to