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 QAA21694; Fri, 28 Dec 2001 16:45:17 +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 QAA21600 for ; Fri, 28 Dec 2001 16:45:16 +0100 (MET) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBSFjFT10816 for ; Fri, 28 Dec 2001 16:45:15 +0100 (MET) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id QAA20358 for caml-list@inria.fr; Fri, 28 Dec 2001 16:45:15 +0100 Date: Fri, 28 Dec 2001 16:45:15 +0100 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: [Caml-list] Re: =?iso-8859-1?Q?=5BCaml-list=5D_Question_sur_les_r=E9f=E9rences=2E?= Message-ID: <20011228164515.H16590@verdot.inria.fr> References: <3C2C7FC9.86AD1CA3@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <3C2C7FC9.86AD1CA3@free.fr>; from watchdog@free.fr on Fri, Dec 28, 2001 at 03:20:57PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Salut, On Fri, Dec 28, 2001 at 03:20:57PM +0100, WatchDog wrote: > let resultat (a,b,c,d) position = > let pos=ref position in > !pos.(d).(c) <- !pos.(b).(a) ; !pos.(b).(a) <- V ; > !pos ;; C'est normal, c'est comme si tu écrivais: let resultat (a,b,c,d) position = let pos= position in pos.(d).(c) <- pos.(b).(a) ; pos.(b).(a) <- V ; pos ;; > let x = ref 1 in x := !x + 1;; > ça ne modifie pas la valeur de l'entier 1, non ??? Ben non. Mais 1 n'est pas une valeur mutable, tandis qu'un tableau, c'est mutable. Tu peux écrire: a.(i) <- b et pas: 1 <- b -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr