Search Tools Links Login

Better IsOdd


Visual Basic 6, or VB Classic

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

About this post

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

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.