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 KAA27323; Mon, 2 Jul 2001 10:01:07 +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 KAA27320 for ; Mon, 2 Jul 2001 10:01:07 +0200 (MET DST) Received: from 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 f62815j28693 for ; Mon, 2 Jul 2001 10:01:06 +0200 (MET DST) Received: from checkerlap.d6.com ([64.163.212.190]) by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GFU00IH969QCW@mta5.snfc21.pbi.net> for caml-list@pauillac.inria.fr; Mon, 02 Jul 2001 01:01:02 -0700 (PDT) Date: Mon, 02 Jul 2001 01:03:04 -0700 From: Chris Hecker Subject: Re: [Caml-list] Two quick questions. In-reply-to: X-Sender: def6@shell16.ba.best.com To: Jeremy Fincher , caml-list@pauillac.inria.fr Message-id: <4.3.2.7.2.20010702010116.02a27df0@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >First: I looked at the source code to the Printf module to see exactly how Printf.printf does type checking on the format strings, since I'd like to implement something similar (for reimplementing the "struct" python module, which uses format strings to pack/unpack arbitrary binary data) but I honestly had no idea how it worked. Is something like what Printf.printf does way too "deep magic" for a newbie to O'Caml to do, or are there any good explanations of how it does what it does? It is "deep magic", in the sense that it's hacked into the compiler directly. You can use some of the hacks for your own purposes, but you can't change the format string format. Chris ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr