Search Tools Links Login

Better IsOdd

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



Function IsOdd(Var as integer)
IsOdd = -(Var And 1)
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 79 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.