Bitval Numbers

new topic     » topic index » view thread      » older message » newer message

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?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu