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 RAA07710; Mon, 17 Feb 2003 17:50:09 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA07660 for caml-list@pauillac.inria.fr; Mon, 17 Feb 2003 17:50:09 +0100 (MET) 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 KAA26027 for ; Mon, 17 Feb 2003 10:14:53 +0100 (MET) Received: from camay.yandex.ru (camay.yandex.ru [213.180.193.64]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h1H9Eqf00187 for ; Mon, 17 Feb 2003 10:14:52 +0100 (MET) Received: from YAMAIL (camay.yandex.ru) by mail.yandex.ru id ; Mon, 17 Feb 2003 12:14:44 +0300 Date: Mon, 17 Feb 2003 12:14:44 +0300 (MSK) From: "inv2002" Reply-To: inv2002@yandex.ru Message-Id: <3E50A804.000001.28592@camay.yandex.ru> MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] To: caml-list@inria.fr Subject: [Caml-list] object X-source-ip: 213.147.49.211 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk class virtual obj = object ... end class a_obj = object inherit obj method a_fun = ... end class b_obj = object inherit obj method b_fun = ... end class object_list = object val ht = Hashtbl.create 5 method add: 'a. string -> (#obj as 'a) -> unit = fun key o -> Hashtbl.add ht key (o :> obj) (* i don't know right way, how to store objects *) method find key = Hashtbl.find ht key end i want to store a_obj and b_obj in object_list, after find it and execute a_fun method if the object is a_obj -- ------------------- 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