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]

Reply via email to