From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <5764c029b688c1c0d24a2e97cd764f@gmail.com> X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 10D077EE25 for ; Wed, 6 Nov 2013 13:39:55 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of 5764c029b688c1c0d24a2e97cd764f@gmail.com) identity=pra; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-sender="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of 5764c029b688c1c0d24a2e97cd764f@gmail.com designates 209.85.214.54 as permitted sender) identity=mailfrom; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-sender="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f54.google.com) identity=helo; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="5764c029b688c1c0d24a2e97cd764f@gmail.com"; x-sender="postmaster@mail-bk0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq8IAPQ3elLRVdY2lGdsb2JhbABaghsEwlYWDgEBAQEHCwsJEiqCUxkBGxwCAxIQFhYYAwIBAgEREQEFASINCAKHagEDDwQBnSaDBIxXgwmEJAoZJw1kiQEBBQyUBAOYDIY9iWFBhFE X-IPAS-Result: Aq8IAPQ3elLRVdY2lGdsb2JhbABaghsEwlYWDgEBAQEHCwsJEiqCUxkBGxwCAxIQFhYYAwIBAgEREQEFASINCAKHagEDDwQBnSaDBIxXgwmEJAoZJw1kiQEBBQyUBAOYDIY9iWFBhFE X-IronPort-AV: E=Sophos;i="4.93,647,1378850400"; d="scan'208";a="34012712" Received: from mail-bk0-f54.google.com ([209.85.214.54]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 06 Nov 2013 13:39:54 +0100 Received: by mail-bk0-f54.google.com with SMTP id 6so3511179bkj.27 for ; Wed, 06 Nov 2013 04:39:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=J5pCiiYbUgiK1TVlsLI4q6pDI+OPDWo+gFJ6kZaswHU=; b=Q6tv59RUpyL9fmItomGXxN+W/9UYFKowdJv2VFSr1pcxz6xl/jNddqGY8J781AWg8J QAJUV9MXX5LjN1D4iA5y1+/XR7znaKWTOuZFyvef1EN5j2GmS5cLHsES9q6md7vlnk3F xfuge8P25PPO9qNGI0/hydgmegJdwJVkCrch1T64leCCPj8mq37b4GigDxS2wn1uJYqf OcQ8reJWS+cH6EPO2MTRcAiyIzyn/lgUZU24nUvMEd/8FdynZmXgRB/+Cx+CN0MD3iCK 6Xvt90anmxbW2IjqYcHC+8YMZlB27BvYh+TsCiKWTInt6Zbeh3LfmE3QFMx0SNsEzxWB SqOA== X-Received: by 10.205.14.69 with SMTP id pp5mr1924901bkb.14.1383741594071; Wed, 06 Nov 2013 04:39:54 -0800 (PST) Received: from [172.27.6.170] ([213.106.240.92]) by mx.google.com with ESMTPSA id on10sm23151504bkb.13.2013.11.06.04.39.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 04:39:53 -0800 (PST) Message-ID: <527A389B.9070408@gmail.com> Date: Wed, 06 Nov 2013 12:39:55 +0000 From: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: OCaml X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Caml-list] is there a way for turning strings to "format"s? Hi, I would like to ask, how to do something like: let computed_format = Printf.sprintf "%%0%dd" 5 in Printf.printf computed_format 42 The above code is rejected, because "computed_format" is of type "string" whereas ('a -> 'b, out_channel, unit) format = ('a -> 'b, out_channel, unit, unit, unit, unit) format6 type was expected. My question is: is it possible to turn strings to values that would be accepted by Printf.printf as its first parameter?