VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Get/Set/Clear Bits from a numeric value

by Tim Savage (1 Submission)
Category: VB function enhancement
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

The modual contains 3 functions (full documentation is included in the modual) that let you change bits in a numeric value. This is very usefull as you can store 8 Boolean values in a single byte. It is also usefull for reading headers from Binary files (ie MP3's, MP3 ID3v2 tags). All of the functions are acheived using the AND, OR and XOR operators, also a good example of using these operators.

Inputs
See included Documentation
Assumes
That the input datatype is standard non-floating point numeric value.
Code Returns
See included Documentation

Rate Get/Set/Clear Bits from a numeric value

Download Get/Set/Clear Bits from a numeric value

Download Get/Set/Clear Bits from a numeric value (879 Bytes)

Get/Set/Clear Bits from a numeric value Comments

No comments have been posted about Get/Set/Clear Bits from a numeric value. Why not be the first to post a comment about Get/Set/Clear Bits from a numeric value.

Post your comment

Subject:
Message:
0/1000 characters