My hat goes off to you guys...

---------- Original Message ----------------------------------
From: Dan Haley <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Thu, 5 Oct 2000 10:39:18 -0700 

>Well, after further playing around, it sort of is.  Numberformat is seeing
>the string "4,1" as a date.  That is why you can't do "4,0", and the reason
>the difference between "1,1" and "2,1" is 31, etc.  Numberformat is assuming
>that the date is for this year.  Given that it is a date, numberformat
>converts it to the numeric representation of that date - compare
>numberformat("1,1") and numberformat("1/1/2000").
>
>Now why is it NOT a number that can be used in evaluate?  Well, numberformat
>gives you a text representation of a number, in this case putting in a
>comma.  CF does not consider a string with a comma in it a number, but
>instead thinks it is a list - the same reason Val("4,000") returns "4".
>Follow that?  :)  I'm assuming that numberformat("300") will give you a
>'number' that can be used in evaluate.
>
>And stop blaming your co-workers Katrina. ;)
>
>Dan
>
>-----Original Message-----
>From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, October 05, 2000 9:59 AM
>To: CF-Talk
>Subject: RE: NOT A MATH QUESTION, NumberFormat
>
>
>*I'm* not trying to do this.  A fellow developer here at Volt is and *I'm*
>trying to help him find a reason why it does this.  Interesting that it's
>not a number however.
>
>--K
>
>> -----Original Message-----
>> From: Mark Johnson [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, October 05, 2000 1:22 AM
>> To: CF-Talk
>> Subject: RE: NOT A MATH QUESTION, NumberFormat
>> 
>> 
>> Maybe like Al Gore Allaire is practicing "Fuzy Number Formatting". =)
>> 
>> Mark
>> 
>> -----Original Message-----
>> From: Dan Haley [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, October 05, 2000 5:06 PM
>> To: CF-Talk
>> Subject: RE: NOT A MATH QUESTION, NumberFormat
>> 
>> 
>> And the result isn't a number!  Try this  . . .
>> 
>> <cfset x1 = 0>
>> <cfloop from="1" to="20" index="i">
>>      <cfset x2 = numberformat("#i#,000")>
>>      <cfoutput>i - #x2# - #evaluate(x2 - x1)#<br></cfoutput>
>>      <cfset x1 = x2>
>> </cfloop>
>> 
>> It bombs on the evaluate(x2 - x1) saying that 36,526 is not a 
>> number.  Hmmm.
>> Like the doctor says to the man who complains "it hurts when 
>> I do this",
>> Katrina, don't do this. :)
>> 
>> Dan
>> 
>> -----Original Message-----
>> From: Jaime Garza [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, October 04, 2000 5:28 PM
>> To: CF-Talk
>> Subject: RE: NOT A MATH QUESTION, NumberFormat
>> 
>> 
>> Not so fast
>> 
>> Hex 0x4000 => 16384.
>> Octal 4000 2048.
>> 
>> 36617 in bin => 1000111100001001 which does not look at all 
>> like a 4000 in
>> any numerical system.
>> 
>> With more tests, 4,000, 4,00 4,0 and 4, return the same number.
>> But 3,0 returns 36586
>> And 2,0 returns 36557
>> And 1,0 returns 36526
>> 
>> 36,617 - 36586 = 31
>> 36586 - 36557 = 29
>> 36557 - 36526 =  31
>> 
>> 
>> And it does not take "0,0"
>> 
>> So there is no pattern...  Interesting bug.  Random is not.
>> 
>> <Jaime/>
>> 
>> 
>> 
>> > -----Original Message-----
>> > From: Russel Madere [mailto:[EMAIL PROTECTED]]
>> > Sent: Wednesday, October 04, 2000 5:21 PM
>> > To: CF-Talk
>> > Subject: RE: NOT A MATH QUESTION, NumberFormat
>> >
>> >
>> > It is the comma.  I get the same result on my box.
>> >
>> > Maybe one of the CF Gurus.....  hint hint, Dave Watts or Ben
>> > Forta..... can
>> > give us an explanation.
>> >
>> > When I take out the comma, I get the right number.  What I think is
>> > happening is that the sting is converted into binary by the
>> > function.  Then
>> > it is formatted.
>> >
>> > Russel
>> >
>> > ============================================================
>> >   Russel Madere, Jr.         Senior Web Developer
>> >   ICQ: 5446158               http://www.TurboSquid.com
>> >
>> > Some days you eat the bear; some days the bear eats you.
>> > ============================================================
>> >
>> >
>> > -----Original Message-----
>> > From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]
>> > Sent: Wednesday, October 04, 2000 19:01
>> > To: CF-Talk
>> > Subject: RE: NOT A MATH QUESTION, NumberFormat
>> >
>> >
>> > MM,
>> >
>> > The " say's this is a string.
>> >
>> > It comes out at, at least on my machine, 36,617.  Any ideas why?
>> >
>> > BB,
>> > --K
>> >
>> > > -----Original Message-----
>> > > From: Mark Adams [mailto:[EMAIL PROTECTED]]
>> > > Sent: Wednesday, October 04, 2000 4:32 PM
>> > > To: CF-Talk
>> > > Subject: Re: NOT A MATH QUESTION, NumberFormat
>> > >
>> > >
>> > > Ok, I can't find reference to the " in NumberFormat what 
>> does that do?
>> > >
>> > >
>> > > ----- Original Message -----
>> > > From: Mark Adams <[EMAIL PROTECTED]>
>> > > To: CF-Talk <[EMAIL PROTECTED]>
>> > > Sent: Wednesday, October 04, 2000 3:55 PM
>> > > Subject: Re: NOT A MATH QUESTION, NumberFormat
>> > >
>> > >
>> > > > can i look now?
>> > > >
>> > > >
>> > > > ----- Original Message -----
>> > > > From: Chapman, Katrina <[EMAIL PROTECTED]>
>> > > > To: CF-Talk <[EMAIL PROTECTED]>
>> > > > Sent: Wednesday, October 04, 2000 3:59 PM
>> > > > Subject: RE: NOT A MATH QUESTION, NumberFormat
>> > > >
>> > > >
>> > > > > Nope.
>> > > > >
>> > > > > > -----Original Message-----
>> > > > > > From: Mark Adams [mailto:[EMAIL PROTECTED]]
>> > > > > > Sent: Wednesday, October 04, 2000 3:44 PM
>> > > > > > To: CF-Talk
>> > > > > > Subject: Re: NOT A MATH QUESTION, NumberFormat
>> > > > > >
>> > > > > >
>> > > > > > -4,000
>> > > > > >
>> > > > > > Just guessing
>> > > > > >
>> > > > > > -Mark :o)
>> > > > > >
>> > > > > >
>> > > > > > ----- Original Message -----
>> > > > > > From: Chapman, Katrina <[EMAIL PROTECTED]>
>> > > > > > To: CF-Talk <[EMAIL PROTECTED]>
>> > > > > > Sent: Wednesday, October 04, 2000 3:49 PM
>> > > > > > Subject: NOT A MATH QUESTION, NumberFormat
>> > > > > >
>> > > > > >
>> > > > > > > MM,
>> > > > > > >
>> > > > > > > Here's a question for y'all.  It's not math. It's cf.
>> > > > > > >
>> > > > > > > What will
>> > > <cfoutput>#NumberFormat("4,000")#</cfoutput> give you?
>> > > > > > >
>> > > > > > > Try to answer before you test it.
>> > > > > > >
>> > > > > > > BB,
>> > > > > > > --K
>> > > > > > >
>> > > > > > > ---------------------------------------
>> > > > > > > Thank you,
>> > > > > > > Katrina Chapman
>> > > > > > > ColdFusion Web Developer
>> > > > > > > System Development
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > 
>> --------------------------------------------------------------
>> > > > > > ------------
>> > > > > > ----
>> > > > > > > Archives:
>> > > http://www.mail-archive.com/[email protected]/
>> > > > > > > To Unsubscribe visit
>> > > > > > 
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
>> > > > > s/cf_talk or
>> > > > > send a message to [EMAIL PROTECTED] with
>> > > 'unsubscribe'
>> > > in
>> > > > > the body.
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > --------------------------------------------------------------
>> > > ------------
>> > > > --
>> > > > > --
>> > > > > Archives: 
>> http://www.mail-archive.com/[email protected]/
>> > > > > To Unsubscribe visit
>> > > > >
>> > > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
>> > s/cf_talk
>> > or
>> > > > send a message to [EMAIL PROTECTED] 
>> with 'unsubscribe'
>> > in
>> > > > the body.
>> > >
>> > >
>> > 
>> --------------------------------------------------------------
>> ------------
>> > > ----
>> > > > Archives: http://www.mail-archive.com/[email protected]/
>> > > > To Unsubscribe visit
>> > >
>> > 
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
>> s/cf_talk or
>> > > send a message to [EMAIL PROTECTED] with
>> > 'unsubscribe' in
>> > > the body.
>> > > >
>> > >
>> > >
>> > 
>> --------------------------------------------------------------
>> ------------
>> > ----
>> > > Archives: http://www.mail-archive.com/[email protected]/
>> > > To Unsubscribe visit
>> > 
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
>> s/cf_talk or
>> > send a message to [EMAIL PROTECTED] with 
>> 'unsubscribe' in
>> > the body.
>> > >
>> >
>> > ------------------------------------------------------------------
>> > ----------
>> > --
>> > Archives: http://www.mail-archive.com/[email protected]/
>> > To Unsubscribe visit
>> > 
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
>> s/cf_talk or
>> > send a message to [EMAIL PROTECTED] with 
>> 'unsubscribe' in
>> > the body.
>> > ------------------------------------------------------------------
>> > ----------
>> > --
>> > Archives: http://www.mail-archive.com/[email protected]/
>> > To Unsubscribe visit
>> > 
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
>s/cf_talk or
>> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>> the body.
>>
>> ------------------------------------------------------------------
>> ------------
>> Archives: http://www.mail-archive.com/[email protected]/
>> To Unsubscribe visit
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
>_talk or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
>
>----------------------------------------------------------------------------
>--
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>----------------------------------------------------------------------------
>--
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>----------------------------------------------------------------------------
>--
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>----------------------------------------------------------------------------
>--
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to