Or the short way

<cfif isNumeric(myvar)></cfif>



On Mon, Jul 19, 2010 at 5:05 PM, Robert Harrison <[email protected]
> wrote:

>
> WHOOPS ... SYNTAX ERROR
>
> <cfif IsNumeric(myvar) is "true">
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
> -----Original Message-----
> From: Robert Harrison [mailto:[email protected]]
> Sent: Monday, July 19, 2010 5:04 PM
> To: cf-talk
> Subject: RE: coverting string to a numeric value
>
>
> Depending on what you are doing you may want to test the value first to
> ensure it's a number.  You can get hard errors in some cases for data type
> mismatch... like in queries.
>
>
> <cfif IsNumeric(myvar is "true>
>
>        DO YOUR THING
>
> </cfif>
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
> -----Original Message-----
> From: Dave Watts [mailto:[email protected]]
> Sent: Monday, July 19, 2010 4:57 PM
> To: cf-talk
> Subject: Re: coverting string to a numeric value
>
>
> > is there a way I can convert a string to number in coldfusion. I could
> not
> see any related functions to do this?
>
> ColdFusion is very loosely typed, so you don't need to convert a
> string to a number. Just use it a numeric operation and it gets
> treated as a number. Try it, it's fun!
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> http://training.figleaf.com/
>
> Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
> GSA Schedule, and provides the highest caliber vendor-authorized
> instruction at our training centers, online, or onsite.
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335496
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to