caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: Charles Martin <charles@chasm.org>, caml-list@inria.fr
Subject: Re: [Caml-list] ('a, output_chan, unit) format, etc
Date: Fri, 06 Apr 2001 00:16:36 -0700	[thread overview]
Message-ID: <4.3.2.7.2.20010406001355.03570930@shell16.ba.best.com> (raw)
In-Reply-To: <5.0.2.1.0.20010405230727.02698080@chasm.org>


>I'm trying to write my own printf.  Can someone give me a pointer to where the (evidently built-in) format type is explained?  Thanks.

It's not really a type, it's just mocked up that way by the compiler so that the type inference works out for the parms.  It's a total hack (a clever one, but a hack nonetheless).  You use Obj.magic to cast it back to the string, and then use Obj.magic to return a bunch of functions that eat the parms.  Check out printf.ml.

Chris


-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


      reply	other threads:[~2001-04-06  7:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-06  6:28 Charles Martin
2001-04-06  7:16 ` Chris Hecker [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=4.3.2.7.2.20010406001355.03570930@shell16.ba.best.com \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=charles@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).