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] How to read three integers from a text-file... ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-04-26 (01:39)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] How to read three integers from a text-file... ?

On Thu, Apr 25, 2002 at 01:33:44PM +0200, Jérôme Marant wrote:

>   Well, this would make a static printf rather that the well known printf
>   from C, since the format string may be known only at runtime in some
>   cases.

I did not mean that we are going to change the current printf into
a syntax extension. I just said that it is possible. The current
implementation is very practical, since you can manipulate format
variables, and though it supposes a strange typing. With a syntax
extension, you would not have this strange typing and that ability
to use format variables: it is just an interesting exercise. I
did it one day, but I did not terminated it.

About scanf as a Camlp4 syntax extension, I just looked at it: not
a so interesting exercice, actually. We need library functions reading
integers or strings (but not systematically reading a line), skipping
spaces and so on. With a good module with these functions, we are
very close to the result, and Camlp4 brings very few more.

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners