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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 27D0C8011C for ; Sun, 9 Apr 2017 00:24:27 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=josh@berdine.net; spf=Pass smtp.mailfrom=josh@berdine.net; spf=None smtp.helo=postmaster@out1-smtp.messagingengine.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of josh@berdine.net) identity=pra; client-ip=66.111.4.25; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="josh@berdine.net"; x-sender="josh@berdine.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of josh@berdine.net designates 66.111.4.25 as permitted sender) identity=mailfrom; client-ip=66.111.4.25; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="josh@berdine.net"; x-sender="josh@berdine.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@out1-smtp.messagingengine.com) identity=helo; client-ip=66.111.4.25; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="josh@berdine.net"; x-sender="postmaster@out1-smtp.messagingengine.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AgTLIeBYhc/VMmEXURSs3Gkf/LSx+4OfEezUN459i?= =?us-ascii?q?sYplN5qZr8q5bnLW6fgltlLVR4KTs6sC0LuK9fi4EUU7or+5+EgYd5JNUxJXwe?= =?us-ascii?q?43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRp?= =?us-ascii?q?OOv1BpTSj8Oq3Oyu5pHfeQtFiT6ybL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+?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LHR5uxqL2HxiayWJNMMDNoEFeJRFXvbIXMcfoWZCOUL4c1kDsf?= =?us-ascii?q?VZCrRpUt1Bej8gn31+w0faLv5iQEuMe7h5BO7OrJmER3rGQsAg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DYAACgYulYhxkEb0JcHQEFAQsBGAEFA?= =?us-ascii?q?QsBhAmBC45skE2XZiyFeAKDXkMUAQEBAQEBAQEBAQESAQEBCA0JCCgvgjMiAYJ?= =?us-ascii?q?AAQICAUABATgECwshJQ8BHCsGAYoZCA6nFYMOgwgBAQWHTQEBAQcBAQEBAQEaA?= =?us-ascii?q?wWLQIo7nQCHAIxDiWiGb5QANoEmJRYIIwpBhEwPEAyBZHSJLQEBAQ?= X-IPAS-Result: =?us-ascii?q?A0DYAACgYulYhxkEb0JcHQEFAQsBGAEFAQsBhAmBC45skE2?= =?us-ascii?q?XZiyFeAKDXkMUAQEBAQEBAQEBAQESAQEBCA0JCCgvgjMiAYJAAQICAUABATgEC?= =?us-ascii?q?wshJQ8BHCsGAYoZCA6nFYMOgwgBAQWHTQEBAQcBAQEBAQEaAwWLQIo7nQCHAIx?= =?us-ascii?q?DiWiGb5QANoEmJRYIIwpBhEwPEAyBZHSJLQEBAQ?= X-IronPort-AV: E=Sophos;i="5.37,174,1488841200"; d="scan'208";a="268328244" Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2017 00:24:26 +0200 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 84B0C2093C; Sat, 8 Apr 2017 18:24:24 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 08 Apr 2017 18:24:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berdine.net; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=uL4kBaJa5o1wAedLpQTd0JherYKwiIe902W0m8ddw Ws=; b=YTITZWwPuth10aRirD4LxYrVgfG2fTgPHpClQeX9iTItiLBJcq3oAnvBP 8pEYO+d5n3txwNT+fAm9u1uLL2/ZIuBq751/AD6PxWYaEf6qmoT/AKltIDsSZFjS fEOr8crzLjeL6ajo/BgAkYpr6/TFreyZyxt2F6dXfbeN2aY0nX6/0Hnh3qRV8gPA I0FDhtI0WOrZaXBAXSQPocBoKVd917wk6Ix9lrtRlDyYkVsRq7nss0ni5Rb3a1c3 BcpsngPiFX/WH2Gd94Gq9U7kUllRBd067POtG41QC74sGOSAk8dw6OwrVE5D2tgz tIUOO5vmOHB5ZRL0L0TsRlN+UGQoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=uL4kBaJa5o1wAedLpQ Td0JherYKwiIe902W0m8ddwWs=; b=mxEx5AZazH/IKANxZHUbjhHIM8mz9nxh1y Ur7nqVpTwEdS/BKqzqTDyyao3eY7ByWr36clc3R89FXwlq6CGWBcTX7FLzSzVCe1 h7oTMpKj+Phr+0yqTbj2Co8aGWpyjaEBdfM10cOLhALhi2zm94kX4TgRIBJ2v/Us Ih10o7KxkrjcZw+Eh7xQ1odqbZnY5ExHOYun//FxWfDl8097QfpjjgtIlhGuw/le Bp0mzTaRVdeynunhmGTKgQ0r6373CiJo6ooBm+hoSQhztopyrh5UcE/O11APTIIm 0k1qJMycDbbnECU1Wi1ERUwGsSjzpXRZ5R83f8bo5p3MmU6DLmkA== X-ME-Sender: X-Sasl-enc: m/3ZBdyD9bTdkm9UHRqhUZtPJo6XgqPCGAd8hhnE2wnF 1491690264 Received: from jjb-mbp.localdomain (unknown [199.201.66.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 33CCE7E469; Sat, 8 Apr 2017 18:24:24 -0400 (EDT) Received: by jjb-mbp.localdomain (Postfix, from userid 994052071) id 4AD1C9AEB354; Sat, 8 Apr 2017 23:24:22 +0100 (BST) From: Josh Berdine To: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>, "caml-list\@inria.fr" In-Reply-To: <925865e7-4237-0bcb-b4bf-76ca7d5e183e@gmail.com> References: <925865e7-4237-0bcb-b4bf-76ca7d5e183e@gmail.com> Date: Sat, 08 Apr 2017 23:24:22 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Format questions On Sat, Apr 08 2017, Matej Kosik wrote: > Hi everybody, > > I am trying to understand the concepts in the Format module. > > While reading this: > > https://ocaml.org/learn/tutorials/format.html > > One of the mini experiments I did was: > > set_margin 11; > open_hvbox 0; > print_string "---"; > print_space (); > print_string "---"; > print_space (); > print_string "---"; > print_newline (); > print_newline (); > > I've got the expected output, which is: > > --- > --- > --- > > No surprises. > > However, when I tried to write express the same intentions via Format.fprintf function: > > Format.set_margin 11; > Format.fprintf std_formatter "@[---@ ---@ ---@.@."; > > I get: > > --- --- --- > > I'd like to ask for some clues as to why the output of the above Format.fprintf is different from the more verbose version above. Are you, by chance, evaluating this in utop (which seems to mess with std_formatter)? I see your expected behavior using the standard toplevel. (After adding Format. to std_formatter)