|
|
|
Click here to copy the following block |
Option Explicit
Dim mask(0 To 7) As Integer Dim values() As Byte
Public Sub Init(ByVal numEls As Long) ReDim values(numEls \ 8) As Byte End Sub
Private Sub Class_Initialize() Dim i As Integer mask(0) = 1 For i = 1 To 7 mask(i) = mask(i - 1) * 2 Next End Sub
Property Get Item(ByVal index As Long) As Boolean Item = values(index \ 8) And mask(index And 7) End Property
Property Let Item(ByVal index As Long, ByVal new_Item As Boolean) Dim ndx As Long, m As Byte m = mask(index And 7) ndx = index \ 8 values(ndx) = (values(ndx) And Not m) Or (new_Item And m) End Property |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|