caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre Weis <Pierre.Weis@inria.fr>
To: martin@chasm.org (Charles Martin)
Cc: caml-list@inria.fr
Subject: Re: printf - partial application bug
Date: Thu, 4 Jan 2001 22:16:38 +0100 (MET)	[thread overview]
Message-ID: <200101042116.WAA09622@pauillac.inria.fr> (raw)
In-Reply-To: <5.0.0.25.0.20010104114009.00a85670@chasm.org> from Charles Martin at "Jan 4, 101 11:53:08 am"

> I was surprised to discover that:
> 
> # List.iter2 (Printf.printf " (%d %d)") [1;2;3] [4;5;6];;
>   (1 4)2 5)3 6)
> 
> It appears that a partially applied printf "forgets" everything up to the 
> first format directive.

That's not a bug: it is a feature !

Have a look to the FAQ:

http://pauillac.inria.fr/caml/FAQ/FAQ_EXPERT-eng.html#printf

or (for french speaking camlers)

http://pauillac.inria.fr/caml/FAQ/FAQ_EXPERT-fra.html#printf

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/




      reply	other threads:[~2001-01-04 21:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-04 19:53 Charles Martin
2001-01-04 21:16 ` Pierre Weis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200101042116.WAA09622@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=martin@chasm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).