* [Caml-list] ('a, output_chan, unit) format, etc
@ 2001-04-06 6:28 Charles Martin
2001-04-06 7:16 ` Chris Hecker
0 siblings, 1 reply; 2+ messages in thread
From: Charles Martin @ 2001-04-06 6:28 UTC (permalink / raw)
To: caml-list
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.
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] ('a, output_chan, unit) format, etc
2001-04-06 6:28 [Caml-list] ('a, output_chan, unit) format, etc Charles Martin
@ 2001-04-06 7:16 ` Chris Hecker
0 siblings, 0 replies; 2+ messages in thread
From: Chris Hecker @ 2001-04-06 7:16 UTC (permalink / raw)
To: Charles Martin, caml-list
>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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-04-06 7:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-06 6:28 [Caml-list] ('a, output_chan, unit) format, etc Charles Martin
2001-04-06 7:16 ` Chris Hecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox