[racket] Accessing the fields of FFI/C data types

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sat Jan 15 00:26:44 EST 2011

An enum is not a structure, so it has no fields. That ctype will
convert the numbers 0 and 1 to the symbols 'a and 'b respectively.


2011/1/14 Lewis <lewis1711 at gmail.com>:
> Hi all,
> Take the simple example below;
> (require ffi/unsafe)
> (define _foo (_enum '(a b)))
> how would one access the a field of _foo? I could find nothing about
> this in the FFI section on ctypes.
> thanks,
> Lewis
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.