Helpful Information
 
 
Category: ASP Programming
IsNumeric()

In my asp page (which I am using VBScript for)....if I use the IsNumeric(x) function, will this only evaluate true for integers x??? Or will it also evaluate to being true if x contains a decimal point????

It accepts decimal points as well. When in doubt, check the manual (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctisnumeric.asp).

Check the manual and just write some test scripts to see the output...screw around and have fun...it's the best way to learn. you don't need IIS to exucute your VBScript...just write an htm file and open in IE.

<script language="VBScript">

document.write isnumeric("123") & "<br>"

document.write isnumeric("123.33") & "<br>"

document.write isnumeric("12*4") & "<br>"

document.write isnumeric(eval("12*4")) & "<br>"

dim x
document.write isnumeric(execute("x=12*4")) & "<br>"

document.write x & "<br>"

</script>










privacy (GDPR)