| Contents > CFML Reference > ColdFusion Functions > IsNumeric |
|
|
|
|
||
Determines whether a string can be converted to a numeric value. Supports numbers in U.S. number format. For other number support, use LSIsNumeric.
True, if string can be converted to a number; otherwise, False.
IsNumeric(string)
Parameter |
Description |
|---|---|
string |
A string or a variable that contains one. |
<h3>IsNumeric Example</h3>
<cfif IsDefined("FORM.theTestValue")>
<cfif IsNumeric(FORM.theTestValue)>
<h3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput> can be
converted to a number</h3>
<cfelse>
<h3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput> cannot be
converted to a number</h3>
</cfif>
</cfif>
<form action = "isNumeric.cfm">
<p>Enter a string, and find out whether it can be evaluated to a numeric value.
<p><input type = "Text" name = "TheTestValue" value = "123">
<input type = "Submit" value = "Is it a Number?" name = "">
</form>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > IsNumeric |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct135.htm
Comments
Gadget318 said on Mar 15, 2004 at 2:58 AM :