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 QAA28612; Fri, 28 May 2004 16:49:36 +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 QAA27625 for ; Fri, 28 May 2004 16:49:35 +0200 (MET DST) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i4SEnXSH025309 for ; Fri, 28 May 2004 16:49:34 +0200 Received: (qmail 18762 invoked by uid 65534); 28 May 2004 14:49:33 -0000 Received: from p4523e3d4.np.schlund.de (EHLO schluck.use.schlund.de) (212.227.35.69) by mail.gmx.net (mp007) with SMTP; 28 May 2004 16:49:33 +0200 X-Authenticated: #20477425 From: Michael Reply-To: micha-1@fantasymail.de To: caml-list Subject: Re: [Caml-list] a class as method parameter... Date: Fri, 28 May 2004 16:49:33 +0200 User-Agent: KMail/1.6.1 References: <200405281125.50554.micha-1@fantasymail.de> <1085754814.6826.250.camel@pelican.wigram> In-Reply-To: <1085754814.6826.250.camel@pelican.wigram> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200405281649.33162.micha-1@fantasymail.de> X-Miltered: at concorde with ID 40B7517D.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 28.:99 2004:99 2004:99 val:01 weirdness:01 val:01 wrote:03 wrote:03 object:03 rename:03 parameter:04 standalone:05 useless:05 fri:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Freitag, 28. Mai 2004 16:33, skaller wrote: > On Fri, 2004-05-28 at 19:25, Michael wrote: > > Hi, > > > > I don't understand why this doesn't work: > > > > class one = object > > val name = "test" > > method name = name > > end;; > > What kind of weirdness is this? A val called name > and also a method called name?? oke, use: class one method name = "one" end it is just an access method to get the val back, rename it as you like :-). pretty useless, of course as standalone program, the whole thing, but short enough for my previous question: why does this not work: method take_one ( o : #one ) = o#name (in class two...) Michael ------------------- 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