Sub WriteBit(ByRef Data As byte,ByVal BitIndex As Integer, ByVal NewBit As Boolean)

If NewBit = True Then
Data = Data And Math.Pow(2, BitIndex)
Else
Data = Data And (&HFF - Math.Pow(2, BitIndex))
End If

End Sub

Function ReadBit(ByRef Data As byte,ByVal BitIndex As Integer) as Boolean

return (Data And Math.Pow(2, BitIndex))) / Math.Pow(2, BitIndex)

End Sub

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 傑克鼠 的頭像
    傑克鼠

    傑克的下午茶

    傑克鼠 發表在 痞客邦 留言(3) 人氣()