From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA29500; Wed, 24 Apr 2002 20:46:53 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA29503 for ; Wed, 24 Apr 2002 20:46:52 +0200 (MET DST) Received: from mail.cs.net.pl (cyber.cs.net.pl [62.233.142.98]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g3OIko121324 for ; Wed, 24 Apr 2002 20:46:50 +0200 (MET DST) Received: by mail.cs.net.pl (Postfix, from userid 510) id E9C71E16; Wed, 24 Apr 2002 20:46:44 +0200 (CEST) Date: Wed, 24 Apr 2002 20:46:44 +0200 From: Tomasz Zielonka To: Stefano Lanzavecchia Cc: caml-list@inria.fr Subject: Re: [Caml-list] How to read three integers from a text-file... ? Message-ID: <20020424184644.GA13649@cs.net.pl> References: <15557.14957.358556.545541@absurd.mimuw.edu.pl> <002501c1eb7d$08390b00$58a4b9c2@MADOKA> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002501c1eb7d$08390b00$58a4b9c2@MADOKA> User-Agent: Mutt/1.3.28i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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