The function is involved in a post in csdn today, to the effect that the IsNumeric () function of the VBS has a problem, and it treats the letter "D" and "D" as numbers.
I did a simple test on the client, and if the letter "D" or "D" were embedded in the number (not the first and the last), such as "2d3", the IsNumeric () The result of the judgment was true! -Is it really a bug? That's ridiculous, isn't it?
I did a cursory check of the VBS reference and MSDN, which did not mention the bug of IsNumeric (). Then I looked very wisely at Aspfaq and finally found the answer:
In VBS, the IsNumeric () function is the actual function of determining whether a parameter expression is a numeric value, and this so-called "value" contains not only ordinary numbers but also (but may not be limited to) the following:
Scientific notation of notation, such as "2e7" and "2d7";
Hexadecimal numbers, such as "&h0a";
Octal number, such as "&6";
The Currency amount expression set under the current region, such as "¥12.44";
The number of parentheses, such as "(34)";
Explicitly specify positive and negative numbers, such as "+2.1" and "2.1";
A numeric string containing commas, such as "12,25".
Not only Vbs,jscript/javascript isNaN () also have similar problems, isnumeric () in T-SQL is the same! We can study it by ourselves.
So, if you're starting to feel a bit uneasy about a program you've written before, then you'll have to implement a function to verify that the expression is a number-safe.
Thank Aspfaq, of course, also thank csdn on the post of friend Zsrui (chassis).