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 EAA13432; Fri, 4 Apr 2003 04:27:34 +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 EAA21034 for ; Fri, 4 Apr 2003 04:27:32 +0200 (MET DST) Received: from swordfish ([216.241.35.41]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h342RV502193; Fri, 4 Apr 2003 04:27:31 +0200 (MET DST) Received: from matt by swordfish with local (Exim 3.35 #1 (Debian)) id 191GvS-0004pB-00; Thu, 03 Apr 2003 19:27:30 -0700 Date: Thu, 3 Apr 2003 19:27:30 -0700 From: Matt Gushee To: caml-list@pauillac.inria.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Really confused - repost Message-ID: <20030404022730.GA17836@swordfish> Reply-To: Matt Gushee Mail-Followup-To: caml-list@pauillac.inria.fr, caml-list@inria.fr References: <3e8cd864.72ae.19774@gis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e8cd864.72ae.19774@gis.net> User-Agent: Mutt/1.3.27i X-Spam: no; 0.00; gushee:01 mgushee:01 havenrock:01 caml-list:01 englewood:01 manure:01 ignores:01 --lao:01 merel:01 arrays:01 groups:01 string:03 revised:03 wrote:03 assign:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Apr 03, 2003 at 07:57:08PM -0500, Ryan Bastic wrote: > > it should be fairly clear what i'm trying to do... i want to split up > the vector > of student names into varying-sized groups, preferably using arrays of > arrays, but any other data structure will do :-) > > if you try executing students.ml, you'll see on line 68 there is a > problem... > > can anyone point me in the direction as to what's going on?? Sure. What you are doing here !groups.(!q) := ar; is trying to assign an array ref as the *value* of a ref. In other words, you're trying to replace something like: [|"Phred","Sue"|] with { contents = [|"Karla","Hans"|] } which is obviously a different type ( string array ref instead of string array). I think what you want to do is !groups.(!q) <- ar; The revised version is replacing an array element (which is a ref) with a new ref. -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- 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