This would work if you were looking for a natural number (is this the
term in English: positive integer).
Integer would be
<cfif REFind("^[-+]?[0-9]+$",val)>
integer
<cfelse>
not an integer
</cfif>
But of course there is a udf on cflib as usual (as Tony already pointed
out)
Pascal
> -----Original Message-----
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: donderdag 1 april 2004 21:44
> To: CF-Talk
> Subject: Re: Checking for a number
>
> dunno if it's the -best- way...but would this work?
>
> <cfif reFind('[^0-9]', myNumber)>
> number is not an integer
> <cfelse>
> number is an integer
> </cfif>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Checking for a number Tangorre, Michael
- RE: Checking for a number Tony Weeg
- RE: Checking for a number Tony Weeg
- RE: Checking for a number Barney Boisvert
- Re: Checking for a number Charlie Griefer
- RE: Checking for a number Michael Kear
- RE: Checking for a number Pascal Peters
- RE: Checking for a number Tim Blair