English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Some, None and the caml-C interface
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-01-09 (02:54)
From: Yaron M. Minsky <yminsky@C...>
Subject: [Caml-list] Some, None and the caml-C interface
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))


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