chartsEngine bug with version 10 of LC

scott at elementarysoftware.com scott at elementarysoftware.com
Wed Dec 29 00:41:55 EST 2021


Hello Curry,
I’m still puzzled.  So you are saying that if the first char of the string is a number then it uses the number but if the first char is not a number then it uses the ascii value of the first char?  It seems like there is more to it than that. Obviously we wouldn’t expect    “9foo”  =  9  to evaluate to “true”  and why then would “9foo"  >  9  return “true” ?  I’m not trying to solve any current programming issue with this question… just curious.

Thanks


> On Dec 28, 2021, at 7:56 PM, Curry Kenworthy via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 
> Scott:
> 
> > I’m still a little unclear about exactly what is going on here.
> 
> Because you are NOT comparing numbers.
> You are comparing (like sorting) text.
> 
> That usually means: the FIRST CHAR of each string.
> (The ASCII/ANSI/etc values of those chars.)
> 
> > put “7.foo” < 9 -- returns “true”
> 
> Because "7" < "9".
> 
> > put “77.foo” < 9 -- returns “true”
> 
> Because "7" < "9". (FIRST CHAR)
> 
> I just looked at WordLib's code:
> it's already coded correctly!
> Ready for LC version 10 or LC 1000.
> 
> (Going way back, I was already cautious
> about these dotted-version comparisons.)
> 
> Best wishes,
> 
> Curry Kenworthy
> 
> WordLib: Import MS Word and OpenOffice documents in LiveCode!
> http://livecodeaddons.com/wordlib.html
> 
> Christian LiveCode Training and Consulting
> http://livecodeconsulting.com/
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list