Displaying Source Code(s)
|
|
Checks if a string is Binary
--------------------------------------------------------------------------------
Function IsBin(value)
Dim b, bb, i, j, s, values(1)
s = UCase(value)
values(0) = "0"
values(1) = "1"
bb = (Len(s) > 0)
For i = 1 To Len(s)
b = False
For j = 0 To 1
b = b Or (Mid(s, i, 1) = values(j))
Next
bb = bb And b
Next
IsBin = bb
End Function
--------------------------------------------------------------------------------
|
|
|