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 BAA31236; Sat, 17 May 2003 01:20:32 +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 BAA31841 for ; Sat, 17 May 2003 01:20:30 +0200 (MET DST) Received: from opus.davidb.org (66-75-152-1.san.rr.com [66.75.152.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h4GNKST20030 for ; Sat, 17 May 2003 01:20:29 +0200 (MET DST) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 19GoV1-0005sN-00 for ; Fri, 16 May 2003 16:20:27 -0700 Date: Fri, 16 May 2003 16:20:27 -0700 From: David Brown To: Caml List Subject: [Caml-list] OO runtime calling Random.int. Message-ID: <20030516232027.GA22555@opus.davidb.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Spam: no; 0.00; caml-list:01 runtime:01 ocaml:01 inherit:01 int:01 module:03 dave:03 classes:03 init:05 startup:08 davidb:08 something:09 david:09 inside:10 causing:13 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I eventually figured out today that the ocaml runtime is calling Random.int inside of CamlinternalOO.choose. This was causing the bahavior of my program to change when I added new classes (specifically, when I would inherit). I fixed it in this case, by calling Random.init later on in initialization. My real question is when can this be called? Is this something that will only happen during startup of a given module, or can it happen later? Thanks, Dave Brown ------------------- 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