From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 161DA7EE09 for ; Fri, 26 Oct 2012 17:23:50 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of bobzhang1988@gmail.com) identity=pra; client-ip=209.85.216.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of bobzhang1988@gmail.com designates 209.85.216.54 as permitted sender) identity=mailfrom; client-ip=209.85.216.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qa0-f54.google.com) identity=helo; client-ip=209.85.216.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="postmaster@mail-qa0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlACAPmpilDRVdg2jWdsb2JhbABEwjcIIwEBAQEJCQsJEgYjgh4BAQEEAQEBDwIkCAEbHAIDDAYFCw0JFg8JAwIBAgEREQEFARwTCAEBHodRAQMPC54IYgkDjDCCdoR9ChknDVmIdQEFDI8vgyQDlXOBF41GP4Qt X-IronPort-AV: E=Sophos;i="4.80,654,1344204000"; d="scan'208";a="160531439" Received: from mail-qa0-f54.google.com ([209.85.216.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Oct 2012 17:23:49 +0200 Received: by mail-qa0-f54.google.com with SMTP id p27so418812qat.6 for ; Fri, 26 Oct 2012 08:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:newsgroups:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=HF2dN8YjHhecSfvfAU9NpPn3iUseJlmoQke03Eupraw=; b=c/BmiH9RfvcdEAoCfzyXmYtkSwYGOtxiwH2oU0JqQgFa2kuc8f9fsYBX6V2CPFViQf DClAz3gZd2s2Guyz7hXVZQLYXozI9W1cANfPaS4yixbNoxhvFfIkkKhl8PhM1OOuTih5 uNL03GgxQzsFId/NDoxlXJf0XbD04TEzT3VzPfDybM4udPu/2LWvnOL13HTqZPDAKZCF ByuZRruGocJSY8M8vwMMkFGOS7kCRsYCuOTC0lofzePt0usLtNYw69Y9spjQCAain/iF i3ANQWAQtmg3Ol86y3yM8wAWdIWVKz3Y4LC3tvTOYSiJhgxT6YzUWSZgo7eo5qRO/GyW 6c0Q== Received: by 10.224.95.196 with SMTP id e4mr7074857qan.88.1351265028205; Fri, 26 Oct 2012 08:23:48 -0700 (PDT) Received: from seas0879.wireless-pennnet.upenn.edu (seas0879.wireless-pennnet.upenn.edu. [158.130.107.113]) by mx.google.com with ESMTPS id ig20sm1158685qab.19.2012.10.26.08.23.44 (version=SSLv3 cipher=OTHER); Fri, 26 Oct 2012 08:23:45 -0700 (PDT) Message-ID: <508AAB06.5010503@gmail.com> Date: Fri, 26 Oct 2012 11:23:50 -0400 From: Hongbo Zhang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 Newsgroups: gmane.comp.lang.caml.inria To: caml-list@inria.fr References: <87zk4u3r42.fsf@maru.md5i.com> In-Reply-To: <87zk4u3r42.fsf@maru.md5i.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Caml-list] Re: A question about Format boxes Hi, I think he is trying to explain the difference: let s = "--------------------------" in Format.fprintf Format.std_formatter "@[(%s@[(%s@[(%s@,)@]@,)@]@,)@]" s s s;; let s = "--------------------------" in Format.fprintf Format.std_formatter "@[(%s@[(%s@[(%s@,)@]@,)@]@,)@]" s s s;; (--------------------------(--------------------------(-------------------------- )))- : unit = () # let s = "--------------------------" in Format.fprintf Format.std_formatter "@[<1>(%s@[<1>(%s@[<1>(%s@,)@]@,)@]@,)@]" s s s;; let s = "--------------------------" in Format.fprintf Format.std_formatter "@[<1>(%s@[<1>(%s@[<1>(%s@,)@]@,)@]@,)@]" s s s;; (--------------------------(--------------------------(-------------------------- ) ) )- : unit = () HTH On 9/13/12 11:00 AM, Michael Welsh Duggan wrote: > The example at > > shows a major difference in the output of packing versus structural hov > boxes. However, in my experiments I cannot achieve the output this > example assigns to "packing" boxes. (OCaml 3.12) > > My examples from the REPL are below. Would someone be able to tell me > what I am doing incorrectly? > > # Format.printf "@[(---@\n@[(---@\n@[(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () > # Format.printf "@[(---@\n@[(---@\n@[(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () > # Format.printf "@[<2>(---@\n@[<2>(---@\n@[<2>(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () > # Format.printf "@[(---@\n@[(---@\n@[(---@,)@]@,)@]@,)@]@\n";; > (--- > (--- > (---))) > - : unit = () > >