chartsEngine bug with version 10 of LC

scott at elementarysoftware.com scott at elementarysoftware.com
Wed Dec 29 06:31:21 EST 2021


> (If they are equal: then the 2nd chars, etc.)


Ah, that was the helpful piece of information I required. I didn’t realize it worked through the string one ASCII character at a time (with neither side being a “number” anymore.)

(With the exception of upper and lower case characters having different ascii but evaluating as equivalent.)

Whew! I knew I had both consumed coffee and taken a nap. I was about ready to ask you to use smaller words.  :- )

One of the things that was throwing me (though I’m sure everyone else was rolling their eyes) was the

> > “9foo”  >  9
> 
> Because "9" = "9" ... but "f" > “”

because, if I’m understanding this correctly, it is really evaluated as 59 = 59  …. 102 <> empty

I like that "-1” < empty  AND 1 > empty  BUT  0 isn’t lesser/greater/equal to empty.  I’m not sure why this whole string comparison issue hasn’t come up for me before but I’m sure that you will all be thankful that I’m ready to move on to my next question... why is it that the socks I put into the wash aren’t always equivalent  to the socks that come out of the dryer. A rounding issue?

—
Scott


> On Dec 28, 2021, at 10:23 PM, Curry Kenworthy via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 
> Scott:
> 
> > So you are saying that if the first char of the string is a number
> 
> No! There is no number.
> Don't think about numbers. :)
> Both sides are text in your comparison.
> 
> > it uses the ascii value of the first char?
> 
> Always! Because both sides are text.
> Two text strings. No numbers.
> 
> LC compares the FIRST CHAR of each text.
> (If they are equal: then the 2nd chars, etc.)
> 
> > “9foo”  >  9
> 
> Because "9" = "9" ... but "f" > "".
> 
> If you want a numerical comparison,
> both sides must be numbers!
> 
> Once you have two dots, or an "f" etc, it's a string.
> And if either side is text, the comparison is textual.
> 
> 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