Browse thread
[Caml-list] How to read three integers from a text-file... ?
-
Jacek Chrzaszcz
- Stefano Lanzavecchia
- Jacques Garrigue
-
Tomasz Zielonka
- John Max Skaller
- Daniel de Rauglaudre
- Francois Pottier
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Daniel de Rauglaudre <daniel.de_rauglaudre@i...> |
| Subject: | Re: [Caml-list] How to read three integers from a text-file... ? |
Hi, On Wed, Apr 24, 2002 at 11:23:16PM +0200, Tomasz Zielonka wrote: > 3) Create CamlP4 macro/(syntax extension) which will expand to > 'let's binding subsequent ints to given names. Something like: > > READINTS(a, b, c, d) I think that it should be possible to have a Camlp4 syntax extension to have the equivalent of the C function scanf. I can try to implement that, if people are interested. BTW, it is perfectly possible to write printf as a Camlp4 syntax extension not using the special type "format". In such an implementation, "printf" is a keyword always followed by a string. Camlp4 analyses the string and generates calls to print_string, print_int, and so on. The result is normally typed by OCaml. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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