' Test the value of a bit'' NOTE: requires Power2()Function BitTest(ByVal value As Long, ByVal bit As Long) As Boolean ' simply AND with the bit mask ' Range checking is performed in Power2() BitTest = (value And Power2(bit))End Function
![Outage Reddit](https://www.devx.com/wp-content/uploads/Outage-Reddit-300x171.jpg)
Home » BitTest – Test the value of a bit
' Test the value of a bit'' NOTE: requires Power2()Function BitTest(ByVal value As Long, ByVal bit As Long) As Boolean ' simply AND with the bit mask ' Range checking is performed in Power2() BitTest = (value And Power2(bit))End Function
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.