Better IsOdd
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
Tell if a number is odd in one line of code. (and if its not odd its even, but i dont have to tell you that)
Original Author: Dave Katrowski
API Declarations
'none
Code
Function IsOdd(Var as integer)
IsOdd = -(Var And 1)
End Function
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.