VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



SIMPLE way to reverse the value of a Boolean field

by Derreck Dean (2 Submissions)
Category: Coding Standards
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

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

Rate SIMPLE way to reverse the value of a Boolean field


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

Download this snippet    Add to My Saved Code

SIMPLE way to reverse the value of a Boolean field Comments

No comments have been posted about SIMPLE way to reverse the value of a Boolean field. Why not be the first to post a comment about SIMPLE way to reverse the value of a Boolean field.

Post your comment

Subject:
Message:
0/1000 characters