Yes, ColdFusion will intepret that as a number.
For example, try this:
<cfset var1 = "0.00">
<cfset var2 = "0">
<CFIF Var1 EQ 0>
TRUE
<CFELSE>
False
</CFIF>
<br>
<br>
<CFIF Var1 EQ "0">
TRUE
<CFELSE>
False
</CFIF>
<cfif var1 eq var2>
True
<cfelse>
False
</cfif>
Note that generally when something is surrounded by quotes, it's a text object, but in
this case since the value is a number, it will be evaluated as a number.
---mark
--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Fax: (714) 972-2181
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------
> -----Original Message-----
> From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 12:20 PM
> To: CF-Talk
> Subject: CF number question
>
>
> I have a form variable whose value is "0.00"
>
> if I do a conditional, would this be right?
>
> <CFIF Form.Variable EQ 0>
> TRUE
> <CFELSE>
> False
> </CFIF>
>
> what i am saying is, will "0.00" be the same as 0? will it read it as a
> string or a number? or sometimes? explain!
>
>
> thanx
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists