Jochem,

Right! good catch.  I should have seen that.  I have a web service ap for
news where users pass in a story number (int).  I use "val( )" on it to make
sure it is an int so the customer doesn't pass in anything else.  We have
one customer who periodically passes in a UUID instead of an int. It usually
errors out or gives him an invalid story number error, but if it begins with
a number followed by a "D" SQL server would throw a "numeric value out of
range" error.  That's the same condition as seen here. I should have seen
it.

-mk

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 13, 2002 4:29 PM
To: CF-Talk
Subject: Re: 33 and 33d the same?


"33D" is some sort of scientific notation for the number 33 (D =
decimal?). And 33 is equal to 33. Just like 33F is some sort of
different notation (F = fixed?). And of course there is the 33E-1 we all
know.
The script below will demonstre better what will work:

<cfset Variables.A = 33/>
<cfoutput>#Variables.A * 1#</cfoutput><br>

<cfset Variables.A = "33">
<cfoutput>#Variables.A * 1#</cfoutput><br>

<cfset Variables.A = "33D"/>
<cfoutput>#Variables.A * 1#</cfoutput><br>

<cfset Variables.A = "33F"/>
<cfoutput>#Variables.A * 1#</cfoutput><br>

<cfset Variables.A = "33E-1"/>
<cfoutput>#Variables.A * 1#</cfoutput><br>

The short version: use Compare() if you intend to compare strings, and
strip D, E and F out of the variables if you intend to compare numbers.

Jochem


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to