[plt-scheme] _bitmask usage in foreign.ss

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Sun Sep 11 20:56:39 EDT 2005

This pertains to the foreign function interface( foreign.ss ) in 
mzscheme. Given the following C code
#define a 1
#define b 2
#define c 4
#define d 8
#define foo (a|c)

What is the equivalent with the _bitmask syntax? Could something like
(_bitmask '(a 1
                    b 2
                    c 4
                    d 8
                    foo (a|c)))

be supported in the future?

Also, Eli, could you add an example usage of _enum and _bitmask on the 
documentation on the website? I keep having to remind myself how to use 
them.

thanks


Posted on the users mailing list.