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 SAA08836; Tue, 29 Oct 2002 18:09:15 +0100 (MET) 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 SAA08403 for ; Tue, 29 Oct 2002 18:09:14 +0100 (MET) Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9TH9E505923 for ; Tue, 29 Oct 2002 18:09:14 +0100 (MET) Received: from www.mydomain.com (strasbourg-2-a7-62-147-14-38.dial.proxad.net [62.147.14.38]) by postfix3-2.free.fr (Postfix) with SMTP id 4660A17EF1 for ; Tue, 29 Oct 2002 18:09:13 +0100 (CET) Date: Tue, 29 Oct 2002 18:17:46 +0100 From: Nicolas FRANCOIS (AKA El Bofo) To: Caml List Subject: Re: [Caml-list] I'm getting slightly mad Message-Id: <20021029181746.293ce5bc.nicolas.francois@free.fr> In-Reply-To: <20021029041713.3cd91c24.nicolas.francois@free.fr> References: <20021029041713.3cd91c24.nicolas.francois@free.fr> X-Mailer: Sylpheed version 0.8.3 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Le Tue, 29 Oct 2002 04:17:13 +0100 Nicolas FRANCOIS (AKA El Bofo) a écrit : > let recopie_tableau tableau = > let tableau' = Array.make_matrix 31 31 (case_vide ()) in > for i = 0 to 30 do > for j = 0 to 30 do > tableau'.(i).(j).occupe <- tableau.(i).(j).occupe; > for k = 0 to 3 do > tableau'.(i).(j).etat.(k) <- tableau.(i).(j).etat.(k) > done > done > done; > tableau' Thanks to Michel Quercia, my problem is solved, by adding a line to this copy function : let recopie_tableau tableau = let tableau' = Array.make_matrix 31 31 (case_vide ()) in for i = 0 to 30 do for j = 0 to 30 do tableau'.(i).(j) <- case_vide (); (* This is the new line, essential ! *) tableau'.(i).(j).occupe <- tableau.(i).(j).occupe; for k = 0 to 3 do tableau'.(i).(j).etat.(k) <- tableau.(i).(j).etat.(k) done done done; tableau' \bye -- Nicolas FRANCOIS http://nicolas.francois.free.fr We are the Micro$oft. Resistance is futile. You will be assimilated. ------------------- 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