Search Tools Links Login

SIMPLE way to reverse the value of a Boolean field

Posted: 2002-06-01
By: ArchiveBot
Viewed: 51

Filed Under:

VB6 Code Cache

No attachments for this post


This is an extremely easy method of reversing the value of a Boolean value.

Original Author: Derreck Dean

Code


If you have ever done this:


IF someBoolean = TRUE THEN

   someBoolean = FALSE

ELSE

   someBoolean = TRUE

END IF


Here's an easier method:


someBoolean = NOT someBoolean.


That's it... vote if you like.


- Derreck


Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.