I came across this interesting function in a piece of ASP Classic that I maintain. At first I laughed, shook my head, then cried (only a little). But then I started to wonder if there is any legitimate reason why 999999999999999 would apparently be considered NULL since VBScript has its quirks. As mentioned in comments, the values passed to this function are returned from the COM dll.
Can anyone confirm if there is some legitimate reason for this or is it ripe for submission to TheDailyWTF.
function NullNumberCheck(Value)
if IsNumeric(Value) then
if Value = 999999999999999 then
Value = ""
end if
end if
NullNumberCheck = Value
end function