Thanks Mike. I actually told him to try CompareNoCase and that did work. Just curious
Mark Davis Cricket Communications Software Engineer III 303-734-7694 (w) -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Gillespie Sent: Thursday, July 26, 2007 1:38 PM To: Houston ColdFusion Users' Group Subject: [houcfug] Re: comparison of long numbers I think you are hitting up against the integer datatype trap since you are using numbers and equals. If you had pure strings it would work. I think what CF is evaluting the numbers to is 1234567890123456E1 (converting to an exponant) Try compare instead comparenocase("1234567890123456","1234567890123457") = #comparenocase("1234567890123456","1234567890123457")#<br> comparenocase("12345678901234567","12345678901234568") = #comparenocase("12345678901234567","12345678901234568")#<br> comparenocase("1234567890123456a","1234567890123456b") = #comparenocase("1234567890123456a","1234567890123456b")#<br> On Jul 26, 2:19 pm, "Mark Davis" <[EMAIL PROTECTED]> wrote: > I am posting this for a co-worker... > > He is trying to see if two 18 character number strings are equal and > finding that anything over 16 digits always comes back as a match > > This one returns: NO MATCH (16 digits) > > <cfif 1234567890123456 EQ 1234567890123457> > > match > > <cfelse> > > no match > > </cfif> > > This one returns: MATCH (17 digits) > > <cfif 12345678901234567 EQ 12345678901234568> > > match > > <cfelse> > > no match > > </cfif> > > Anyone have a clue as to why this is? > > Mark Davis > Cricket Communications > Software Engineer III > > 303-734-7694 (w) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Houston ColdFusion Users' Group" discussion list. To unsubscribe, send email to [EMAIL PROTECTED] For more options, visit http://groups.google.com/group/houcfug?hl=en -~----------~----~----~----~------~----~------~--~---
