Match varialbes with case sensitivity.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 9864
- Joined: Fri Feb 19, 2010 10:17 am
Re: Match varialbes with case sensitivity.
I did not understand those to be the names of variable, I understood those to be the contents of the variables.
Re: Match varialbes with case sensitivity.
Well, it's about time that Googie chimes in again. 

-
- Livecode Opensource Backer
- Posts: 9864
- Joined: Fri Feb 19, 2010 10:17 am
Re: Match varialbes with case sensitivity.
It is.
The problem, Craig, with numToChar, is that it assumes that all the alphabetic characters are Latinate е това е един проблем с други езици ( and that's a problem with other languages).
The problem, Craig, with numToChar, is that it assumes that all the alphabetic characters are Latinate е това е един проблем с други езици ( and that's a problem with other languages).

-
- VIP Livecode Opensource Backer
- Posts: 9982
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Match varialbes with case sensitivity.
The caseSensitivity property should apply to operations performed on all strings, not limited to field contents.
I'm not at a computer to verify, but I'm pretty certain I've used it on variables before.
I'm not at a computer to verify, but I'm pretty certain I've used it on variables before.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9864
- Joined: Fri Feb 19, 2010 10:17 am
Re: Match varialbes with case sensitivity.
I have had no luck with it working on variable.
Although my reading of the Dictionary does not seem to exclude variables:
-
Although my reading of the Dictionary does not seem to exclude variables:
-
Re: Match varialbes with case sensitivity.
We do need to know the reason for the comparison. If the goal is just to use the two as identical you shouldn't need to do anything because LC will treat them the same automatically.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Match varialbes with case sensitivity.
Richmond.
Hardly an issue. Set the "useUnicode" property, and upgrade to "numToCodepoint" My only point was to offer this method as a possible solution.
Craig
Hardly an issue. Set the "useUnicode" property, and upgrade to "numToCodepoint" My only point was to offer this method as a possible solution.

Craig
-
- Livecode Opensource Backer
- Posts: 9864
- Joined: Fri Feb 19, 2010 10:17 am
Re: Match varialbes with case sensitivity.
Indeed: my second stack, which I posted before you, leveraged numToCodePoint.Hardly an issue.

-
- VIP Livecode Opensource Backer
- Posts: 9982
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Match varialbes with case sensitivity.
Try this:
Code: Select all
put "Hello" into s1; put "hello" into s2; set the caseSensitive to true; put (s1 is s2)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Match varialbes with case sensitivity.
That does not count!FourthWorld wrote: ↑Fri Jan 31, 2025 11:49 pmTry this:Code: Select all
put "Hello" into s1; put "hello" into s2; set the caseSensitive to true; put (s1 is s2)

We are currently presuming, until Googie chimes in again, that the TS want to differ two VARIABLE names, not their content!
So this will of course return FALSE:
Code: Select all
put "Hello" into sss1; put "hello" into SSS2; set the caseSensitive to true; put (sss1 = SSS2)
-
- VIP Livecode Opensource Backer
- Posts: 9982
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Match varialbes with case sensitivity.
Does the caseSensitive not work with array keys?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9864
- Joined: Fri Feb 19, 2010 10:17 am
Re: Match varialbes with case sensitivity.
Why should we presume that?We are currently presuming, until Googie chimes in again, that the TS want to differ two VARIABLE names, not their content!
The OP did NOT write "I'm wondering how to match 2 variables' names with case sensitivity.
I'm wondering how to match 2 variables with case sensitivity. For example, AlPhA123 will currently match Alpha123. How do I match these variables with Case Sensitivity?
Re: Match varialbes with case sensitivity.
OK, OK, I (EYE) presumed that. 

-
- Livecode Opensource Backer
- Posts: 9864
- Joined: Fri Feb 19, 2010 10:17 am
Re: Match varialbes with case sensitivity.
No angels. 
