From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA11831; Fri, 6 Apr 2001 09:15:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA11814 for ; Fri, 6 Apr 2001 09:15:53 +0200 (MET DST) Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f367Fpf15713 for ; Fri, 6 Apr 2001 09:15:52 +0200 (MET DST) Received: from checkerlap.d6.com ([64.163.212.241]) by mta5.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0GBD00E5M05IBG@mta5.snfc21.pbi.net> for caml-list@inria.fr; Fri, 6 Apr 2001 00:15:29 -0700 (PDT) Date: Fri, 06 Apr 2001 00:16:36 -0700 From: Chris Hecker Subject: Re: [Caml-list] ('a, output_chan, unit) format, etc In-reply-to: <5.0.2.1.0.20010405230727.02698080@chasm.org> X-Sender: def6@shell16.ba.best.com To: Charles Martin , caml-list@inria.fr Message-id: <4.3.2.7.2.20010406001355.03570930@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >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