Browse thread
[Caml-list] How to read three integers from a text-file... ?
[
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: | Tomasz Zielonka <zielony@c...> |
| Subject: | Re: [Caml-list] How to read three integers from a text-file... ? |
On Wed, Apr 24, 2002 at 12:44:37PM +0200, Stefano Lanzavecchia wrote: > > Moreover in such contests the use of external libraries (Str) if often > > forbidden. > > Well, in that case the use of scanf should be prohibited too. Str is > part of the standard OCaml distributed library and it's in no way > different from scanf. They are different with regard to typical contest rules, which are simple (maybe too simple). Those rules describe commands, which will be used to compile programs, typically: C - gcc source.c OCaml - ocamlopt source.ml The C program can use scanf, which is in libc. The OCaml program can't use Str. > While it's certainly easy to rewrite parts of Str in OCaml (and the > source code is available), Str source code is mainly C, not OCaml. > your students would probably find a bit harder to recode scanf in pure > C... scanf source is available too and it is probably C. And I wouldn't say that implementing regular expression matching library is easier than implementing scanf. regards, tom -- sig outdated ------------------- 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