[
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: | Nicolas FRANCOIS <nicolas.francois@f...> |
| Subject: | Re: [Caml-list] I'm getting slightly mad |
Le Tue, 29 Oct 2002 04:17:13 +0100 Nicolas FRANCOIS (AKA El Bofo)
<nicolas.francois@free.fr> 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