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 DAA13316; Thu, 9 Jan 2003 03:54:51 +0100 (MET) 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 DAA13429 for ; Thu, 9 Jan 2003 03:54:49 +0100 (MET) Received: from grebe.mail.pas.earthlink.net (grebe.mail.pas.earthlink.net [207.217.120.46]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h092smr10137 for ; Thu, 9 Jan 2003 03:54:49 +0100 (MET) Received: from user-0cev2t6.cable.mindspring.com ([24.239.139.166] helo=[192.168.0.3]) by grebe.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18WSqE-00066s-00 for caml-list@inria.fr; Wed, 08 Jan 2003 18:54:46 -0800 Subject: [Caml-list] Some, None and the caml-C interface From: "Yaron M. Minsky" To: Caml List Content-Type: text/plain Organization: Cornell University Message-Id: <1042080881.25626.66.camel@dragonfly.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 08 Jan 2003 21:54:44 -0500 Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've written some simple macros for accessing options in ocaml, and I want to double check that they are actually right. Does this look right? And is this documented anywhere? #define Is_None(v) (Is_long(v)) #define Is_Some(v) (!Is_None(v)) #define Some_val(v) (Field(v,0)) Thanks, Yaron ------------------- 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