caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <frisch@clipper.ens.fr>
To: Basile STARYNKEVITCH <basile.starynkevitch@cea.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Camlp4: varargs ie a la Printf
Date: Mon, 17 Jun 2002 16:59:05 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.SOL.4.44.0206171656310.21487-100000@clipper.ens.fr> (raw)
In-Reply-To: <15629.62581.329369.773250@is002254.saclay.cea.fr>

On Mon, 17 Jun 2002, Basile STARYNKEVITCH wrote:

> My problem is to produce a quotation of a list of expressions (and not
> a quotation of a list expression). What should I put in place of the
> comment WHAT SHOULD BE ADDED HERE?   trace FOO "i=%d x=%g" i x end

I'm not sure to understand how this is more difficult than the solution
with Printf.kprintf; in both case, you want to generate a 'varargs'
application, right ?  Or what is a "list of expressions" ?

Try something like:

List.fold_left (fun e_1 e_2 -> <:expr< $e_1$ $e_2$ >>)


-- Alain

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-06-17 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17 14:38 Basile STARYNKEVITCH
2002-06-17 14:59 ` Alain Frisch [this message]
2002-06-17 16:20   ` John Malecki
2002-06-18  6:27 ` Daniel de Rauglaudre

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=Pine.SOL.4.44.0206171656310.21487-100000@clipper.ens.fr \
    --to=frisch@clipper.ens.fr \
    --cc=basile.starynkevitch@cea.fr \
    --cc=caml-list@inria.fr \
    /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).