This is a far better proposition:
Code:
Function udfIsInt($i)
$udfIsInt=0
While $i
If Not InStr("0123456789",Left($i,1)) Exit 1 EndIf
$i=SubStr($i,2)
Loop
$udfIsInt=1
Exit 0
EndFunction



This will return true for "" and "0001", but will return false for "123x456".

Note, you can very simply convert this to a general "check that only these values are present" function by making the "valid" string an additional optional parameter.