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 DAA05764; Wed, 24 Apr 2002 03:03:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA05727 for ; Wed, 24 Apr 2002 03:03:06 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3O135v20752 for ; Wed, 24 Apr 2002 03:03:05 +0200 (MET DST) Received: from mel-rta4.wanadoo.fr (193.252.19.58) by mel-rto2.wanadoo.fr; 24 Apr 2002 03:03:05 +0200 Received: from warp (80.14.218.153) by mel-rta4.wanadoo.fr; 24 Apr 2002 03:02:22 +0200 Message-ID: <004301c1eb2b$9f48e440$99da0e50@warp> From: "Warp" To: References: Subject: Re: [Caml-list] Stack Overflow... (recursion in try-statement) Date: Wed, 24 Apr 2002 03:01:52 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > why does an stack overflow-error occur here? > > let rec traversedir dir = > try ( [Unix.readdir dir] @ traversedir dir ) with > End_of_file -> [];; > > > I have not tried it with very deep directories, so > I did not expect such an error... > > What is the problem here? Perhaps he's looping because ".." is also a dir. You should try to do some print to figure it out Nicolas Cannasse ------------------- 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