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 SAA12248; Wed, 6 Aug 2003 18:27:53 +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 SAA24712 for ; Wed, 6 Aug 2003 18:27:52 +0200 (MET DST) Received: from opus.davidb.org (66-75-152-1.san.rr.com [66.75.152.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h76GRpf15677 for ; Wed, 6 Aug 2003 18:27:51 +0200 (MET DST) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 19kR5a-0007kj-00; Wed, 06 Aug 2003 09:24:38 -0700 Date: Wed, 6 Aug 2003 09:24:38 -0700 From: David Brown To: Richard Jones Cc: David Brown , Vovka , caml-list@inria.fr Subject: Re: [Caml-list] static class member.... Message-ID: <20030806162438.GB29738@davidb.org> References: <000201c35c17$2cefc4a0$0300a8c0@James> <200308061657.26300.jove@newmail.ru> <20030806144523.GA29653@redhat.com> <20030806145148.GA29231@davidb.org> <20030806151051.GB29704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030806151051.GB29704@redhat.com> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 foo:01 invocation:01 06,:02 dave:03 wrote:03 let:04 aug:05 arg:06 static:06 0100,:08 davidb:08 function:09 david:09 wed:12 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Aug 06, 2003 at 04:10:51PM +0100, Richard Jones wrote: > > > class foo = > > > let counter = ref 0 in Now I remember why I thought that wouldn't work. class foo arg = let counter = ref 0 in ... would get a new counter instance each time the class is invoked. This acts as a function wrapped around the class invocation. Dave ------------------- 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