English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Two quick questions.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-07-02 (08:01)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] Two quick questions.

>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.


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