From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id AC165BBAF for ; Fri, 11 Sep 2009 13:27:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEAAGvQqUqK6AGOkWdsb2JhbACBU5lxAQEBAQkLCgcTBbBnj2iEGAU X-IronPort-AV: E=Sophos;i="4.44,369,1249250400"; d="scan'208";a="35876969" Received: from lmr1.uibk.ac.at (HELO smtp.uibk.ac.at) ([138.232.1.142]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Sep 2009 13:27:53 +0200 Received: from localhost.localdomain (pc6221-c703.uibk.ac.at [138.232.66.221] christian.sternagel@uibk.ac.at) (authenticated bits=0) by smtp.uibk.ac.at (8.13.8/8.13.8/F1) with ESMTP id n8BBRpZx023416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Sep 2009 13:27:51 +0200 Message-ID: <4AAA3438.5040407@uibk.ac.at> Date: Fri, 11 Sep 2009 13:27:52 +0200 From: Christian Sternagel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 MIME-Version: 1.0 To: caml-list@inria.fr Subject: Format and str_formatter Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.61 at uibk.ac.at on 138.232.1.140 X-Spam: no; 0.00; module's:01 fprintf:01 val:01 cheers:01 fmt:01 fmt:01 namely:02 string:02 seems:03 flush:03 unit:03 unit:03 std:03 std:03 let:03 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@}";; val f : Format.formatter -> unit = When used on std_formatter it produces what I expected, namely # f Format.std_formatter;; 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