I think you're getting what's called a "lexical comparison" which is good
jargon for alphabetical order.  If this was in an index of a book, you'd
expect pretty much any letter to appear after an entry that begins with a
number.

I think CF's being nice and clever and realising that it's comparing unlike
types, and converting the number to a string.

-----Original Message-----
From: Tim Blair [mailto:[EMAIL PROTECTED] 
Sent: 05 April 2004 18:14
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] String values and GTE etc


> it may be doing an ASCII char value comparison.

Snot that:

<cfoutput>#teststr GT 9999999999#</cfoutput>  <!--- "YES" --->

:o\

--
-------------------------------------------------------
<CF_CodingContest mode="judging" newentries="false">
Maze Solver - http://tech.badpen.com/cfcontest/
-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
------------------------------------------------------- 

> -----Original Message-----
> From: Snake Hollywood [mailto:[EMAIL PROTECTED] 
> Sent: 05 April 2004 18:06
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] String values and GTE etc
> 
> it may be doing an ASCII char value comparison.
> I.E B is GT A beacause of it's position in the charcaterset 
> and it's value.
> 
> Not that I actually bothered testing this theory :-)
> 
> Russ
> 
> 
> > -----Original Message-----
> > From: Tim Blair [mailto:[EMAIL PROTECTED]
> > Sent: 05 April 2004 15:55
> > To: [EMAIL PROTECTED]
> > Subject: [ cf-dev ] String values and GTE etc
> > 
> > 
> > 
> > Afternoon,
> > 
> > OK, more numeric weirdness.  I had a bug (now fixed) that 
> was caused 
> > by a string value being incorrectly used as numeric.
> > Basically, I was supposed to be checking that the length of 
> a string 
> > was greater than
> > (say) 5 characters:
> > 
> > #len(myString) GT 5#
> > 
> > However, I'd misplaced the closing bracket so I had the following:
> > 
> > #len(myString GT 5)#
> > 
> > Now I would have thought that I would have got an error trying to 
> > compare a non-numeric value (e.g. if myString =
> > "hvuaoeg") to a numeric one, but noooo...  Try the following:
> > 
> > <cfset teststr = "adgbyeai">
> > <cfoutput>#val(teststr)#</cfoutput><br> <!--- "0"   --->
> > <cfoutput>#teststr LT 5#</cfoutput><br> <!--- "NO"  --->
> > <cfoutput>#teststr GT 5#</cfoutput>     <!--- "YES" --->
> > 
> > So what's going on here then?
> > 
> > Tim.
> > 
> > --
> > -------------------------------------------------------
> > <CF_CodingContest mode="judging" newentries="false"> Maze Solver - 
> > http://tech.badpen.com/cfcontest/
> > -------------------------------------------------------
> > RAWNET LTD - Internet, New Media and ebusiness Gurus.
> > WE'VE MOVED - for our new address, please visit our website at 
> > http://www.rawnet.com/ or call us any time on 0800 294 24 24.
> > -------------------------------------------------------
> > This message may contain information which is legally privileged 
> > and/or confidential.  If you are not the intended 
> recipient, you are 
> > hereby notified that any unauthorised disclosure, copying, 
> > distribution or use of this information is strictly 
> prohibited. Such 
> > notification notwithstanding, any comments, opinions, 
> information or 
> > conclusions expressed in this message are those of the 
> originator, not 
> > of rawnet limited, unless otherwise explicitly and independently 
> > indicated by an authorised representative of rawnet limited.
> > -------------------------------------------------------
> > 
> > --
> > These lists are syncronised with the CFDeveloper forum at 
> > http://forum.cfdeveloper.co.uk/
> > Archive: 
> > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> >  
> > CFDeveloper Sponsors and contributors:- *Hosting and 
> support provided 
> > by CFMXhosting.co.uk* ::
> > *ActivePDF provided by activepdf.com*
> >       *Forums provided by fusetalk.com* :: *ProWorkFlow provided by 
> > proworkflow.com*
> >            *Tutorials provided by helmguru.com* :: *Lists hosted by 
> > gradwell.com*
> > 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> --
> These lists are syncronised with the CFDeveloper forum at 
> http://forum.cfdeveloper.co.uk/
> Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>  
> CFDeveloper Sponsors and contributors:-
> *Hosting and support provided by CFMXhosting.co.uk* :: 
> *ActivePDF provided by activepdf.com*
>       *Forums provided by fusetalk.com* :: *ProWorkFlow 
> provided by proworkflow.com*
>            *Tutorials provided by helmguru.com* :: *Lists 
> hosted by gradwell.com*
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided
by activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by
proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by
gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]





-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to