keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #racket
lispmacs has joined #racket
if I create an enum type with '_enum, can I pull out the values of the symbols again (say for comparison)?
like, (_enum '(OK = 0 FAIL = 1)) then (= OK (_somefunc))
ym555_ has joined #racket
ym555_ has quit [Client Quit]
ym555 has quit [Ping timeout: 245 seconds]
lispmacs: I don't think so. I think it only means you could use 'OK when calling an FFI wrapper declared to take an argument of that _enum type.
but I haven't worked much with FFI lately (or really that much, ever)
evdubs has quit [Ping timeout: 248 seconds]
evdubs has joined #racket
lavaflow has joined #racket
greghendershott: i have a C library that has functions that returns values of an enum type, so I was just wondering how to compare. I guess I could also define similar normal symbols that match those numbers value
or, maybe I could define those values anyway? despite being _enum'd, though don't seem to have a value attached to the symbols themselves
iyzsong has joined #racket
lavaflow has quit [Ping timeout: 272 seconds]
That seems reasonable to just make a normal define for each.