Jumat, 17 September 2010

Function BinaryToDouble on VB6

Public Function BinaryToDouble(ByVal strData As String) As Double
Dim dblOutput As Double
Dim lngIterator As Long
Do Until Len(strData) = 0
dblOutput = dblOutput + IIf(Right$(strData, 1) = "1", (2 ^ lngIterator), 0)
strData = Left$(strData, Len(strData) - 1)
lngIterator = lngIterator + 1
Loop
BinaryToDouble = dblOutput
End Function

Related Post :



0 comments:

R