Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 Archives:
Bug reports: FAQ:
Beginner's list: