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 TAA16039; Tue, 17 Jun 2003 19:58:46 +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 TAA16029 for ; Tue, 17 Jun 2003 19:58:45 +0200 (MET DST) Received: from mta11.srv.hcvlny.cv.net (mta11.srv.hcvlny.cv.net [167.206.5.46]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5HHwiH27846 for ; Tue, 17 Jun 2003 19:58:44 +0200 (MET DST) Received: from asv17.srv.hcvlny.cv.net (asv17.srv.hcvlny.cv.net [167.206.5.171]) by mta11.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HGN00BN70LVAH@mta11.srv.hcvlny.cv.net> for caml-list@inria.fr; Tue, 17 Jun 2003 13:58:43 -0400 (EDT) Received: from cs.stevens-tech.edu (ool-4351b041.dyn.optonline.net [67.81.176.65]) by asv17.srv.hcvlny.cv.net (8.12.9/8.12.9) with ESMTP id h5HHva9t005447 for ; Tue, 17 Jun 2003 13:57:39 -0400 (EDT) Date: Tue, 17 Jun 2003 14:03:35 -0400 From: Ye Wu Subject: [Caml-list] variant type To: caml-list@inria.fr Message-id: <3EEF57F7.7020705@cs.stevens-tech.edu> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en, zh-cn User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Spam: no; 0.00; ywu:99 3.14:01 int:01 variant:02 match:02 float:02 let:04 type:07 shape:87 doesn't:12 why:17 please:79 could:20 regards:22 circle:77 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Could you please tell me why the following doesn't work? type shape = Square of int * int * int |Circle of float * float * float;; let area s = match s with Square (_, _, d) -> d * d |Circle (_, _, r) -> 3.14 *. r *. r;; Regards, Ye ------------------- 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