Converts a binary number to decimal.
API Declarations
'Dim Resultado, Bit, Potencia As Integer
'i = Len(Binario) 'lenght of the binary sent
'While i <> 0 '
'Bit = Mid(Binario, i, 1) 'if the string is 1101111 and the value of 'i' is 3 then, the instruction will return '0'
' If Bit = 1 Then Resultado = 2 ^ Potencia + Resultado
' Potencia = Potencia + 1
' i = i - 1 'read the next bit
'Wend
'Binario = Resultado 'now, the binary number will be a decimal number
'End Function