If you remove the quotation marks the answer here should be 4, actually 004.
Because this formats the number output to a certain standard, in this case,
000 where 4 is only one digit and the standard calls for three digits.

With quotation marks here,  got me there.

Richard Ramos
Network Administrator
Softitler Net, Inc.
www.softitler.com
[EMAIL PROTECTED]

----- Original Message -----
From: "Jaime Garza" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, October 04, 2000 5:28 PM
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=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