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 D8CFD7EE25 for ; Thu, 7 Nov 2013 21:45:43 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of of12343@my.bristol.ac.uk) identity=pra; client-ip=74.125.82.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="of12343@my.bristol.ac.uk"; x-sender="of12343@my.bristol.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of of12343@my.bristol.ac.uk) identity=mailfrom; client-ip=74.125.82.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="of12343@my.bristol.ac.uk"; x-sender="of12343@my.bristol.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f174.google.com) identity=helo; client-ip=74.125.82.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="of12343@my.bristol.ac.uk"; x-sender="postmaster@mail-we0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogDAL76e1JKfVKulGdsb2JhbABagz+tC5JWgSYWDgEBAQEHCwsJEiqCJQEBBAEnRwsFCwslISETAQUBChIGExKHXQMJBgQBCJ4elGIDCleJFIxngj8zB4MggRADliGDGoUOhhWDTEGEUQ X-IPAS-Result: AogDAL76e1JKfVKulGdsb2JhbABagz+tC5JWgSYWDgEBAQEHCwsJEiqCJQEBBAEnRwsFCwslISETAQUBChIGExKHXQMJBgQBCJ4elGIDCleJFIxngj8zB4MggRADliGDGoUOhhWDTEGEUQ X-IronPort-AV: E=Sophos;i="4.93,654,1378850400"; d="scan'208";a="41557143" Received: from mail-we0-f174.google.com ([74.125.82.174]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Nov 2013 21:45:02 +0100 Received: by mail-we0-f174.google.com with SMTP id p61so1095466wes.33 for ; Thu, 07 Nov 2013 12:45:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=brC4vw+gR6VxFkFZwWQV1TwCrGpF8DzQGM8oABioLo0=; b=SThir1CE8POm4VUaJYKAMFCrPKCWCU1F+ics/8A4J3aCyAiPk2tbRF3iRwYjo30emG YLL4qXN9usWNyLpiXPDIRWIbo5LNGX7grT/Yn9rhM9o6RabTHsja4DxdrKDqvz1RNDKN Kieu7xk6WA44c2TUpFikGeM5soktDFQb4aDx51Hpp+I93cWLRsRUF/T1doyTMR6VdtI8 BNm/ynZz+Vb2a7h4XPZ2MKlYm3EIS64gcZafe03LTxF81KT6LSABN9QJFnaGfOmfnQb0 YGVJAZvR4DgmfsVp/CTGFGhh7Bpd5RkmqpUgCokGN8Ev8r/kFdKcZezVL9FIG1QyHGJV PDVw== X-Gm-Message-State: ALoCoQlDyjVywei+ndDs2JRDE5Fw1BfcLTGAhRT0JZ77tsvAev9UE73FsovfTbwdpN84qYs0f4ow X-Received: by 10.194.94.137 with SMTP id dc9mr8198710wjb.38.1383857143013; Thu, 07 Nov 2013 12:45:43 -0800 (PST) Received: from [10.0.0.92] (94.197.121.218.threembb.co.uk. [94.197.121.218]) by mx.google.com with ESMTPSA id dn2sm38352014wid.1.2013.11.07.12.45.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Nov 2013 12:45:42 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) From: Ollie Frolovs In-Reply-To: Date: Thu, 7 Nov 2013 20:45:37 +0000 Cc: Gabriel Scherer , Mark Adams , caml users Content-Transfer-Encoding: quoted-printable Message-Id: <24B5DA6D-3203-4F62-BB58-99ED8B1C64EF@my.bristol.ac.uk> References: <1383742480351@names.co.uk> To: David MENTRE X-Mailer: Apple Mail (2.1816) Subject: Re: [Caml-list] is there a way for turning strings to "format"s? When i first saw this question i had a deja vu moment and as was flicking t= hrough =93Real World Ocaml=94 today i found this example in pages 173-174:= =20 #let fmt =3D : (=91a, =91b, =91c) format =3D =93%i is an integer, %F is a f= loat, \=94%s\=94 is a string\n=94;; val fmt =3D (int -> float -> string -> =91c, =91b, =91c) format =3D and then they say you can pass this format string to printf. I don=92t know= if they mean Jane Street=92s Core printf or stock printf. I=92m only a beg= inner myself. =97 Ollie On 7 Nov 2013, at 07:50, David MENTRE wrote: > Hello, >=20 > 2013/11/7 Gabriel Scherer : >> Do not, ever, use Obj.magic on formatting >> functions. >=20 > I would say: "Dot not, ever, use Obj.magic (FULL STOP)". ;-) >=20 > BTW, isn't "ksprintf " and related functions used when one wants to > play with format strings? >=20 > Best regards, > david >=20 > --=20 > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs