IsBin

Checks if the passed argument is a binary or not

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

value

Views 323 Downloads 174

'Bin', 'IsBin', 'check', 'test', 'NotMyWork', 'Math'

ANmarAmdeen
326
Math Classic ASP
Revisions

v1.0