Hi,
does anyone know something about BIT OPERATION in CoolBasic?
I need an "Bit AND" and an "Bit OR". No logical operators!
for example: value = 12423936
farb = (value shr 16) BIT AND 255
if you are interested, I want to write this function for my library:
Function GetColorR(sys_col) :red component of a color.
Return sys_Col & 0xFF
End Function
Function GetColorG(sys_Col) :green component of a color.
Return (sys_Col >> 8) & 0xFF
End Function
Function GetColorB(sys_Col) : blue component of a color.
Return (sys_Col >> 16) & 0xFF
End Function
thank you for the help.




