Bitval Numbers
- Posted by Icy_Viking Mar 16, 2021
- 1062 views
While looking through some C code, I saw bitval(10)
I know this is among bitwise functions. However is the value exactly 10? Usually there is a bit shift like 5 << 1
https://webfocusinfocenter.informationbuilders.com/wfappent/TL2s/TL_lang/source/bitval.htm - A bit string as an integer
If I was wrapping a library for Euphoria how I would go about converting it. Just give the variable the value of 10 if the C code says bitval(10)?
C typdef Enum myEnum { NONE = 0, MY_VAL = BITVAL(10) } MyVal
enum type myEnum NONE = 0, MY_VAL = 10 end enum type
Would my example be the right way of going about this?