Match varialbes with case sensitivity.

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9864
Joined: Fri Feb 19, 2010 10:17 am

Re: Match varialbes with case sensitivity.

Post by richmond62 » Fri Jan 31, 2025 4:21 pm

I did not understand those to be the names of variable, I understood those to be the contents of the variables.

Klaus
Posts: 14061
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Match varialbes with case sensitivity.

Post by Klaus » Fri Jan 31, 2025 4:25 pm

Well, it's about time that Googie chimes in again. 8)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9864
Joined: Fri Feb 19, 2010 10:17 am

Re: Match varialbes with case sensitivity.

Post by richmond62 » Fri Jan 31, 2025 4:39 pm

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). 8)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9982
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Match varialbes with case sensitivity.

Post by FourthWorld » Fri Jan 31, 2025 5:22 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9864
Joined: Fri Feb 19, 2010 10:17 am

Re: Match varialbes with case sensitivity.

Post by richmond62 » Fri Jan 31, 2025 5:37 pm

I have had no luck with it working on variable.

Although my reading of the Dictionary does not seem to exclude variables:
-
Screenshot 2025-01-31 at 18.37.06.png

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7358
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Match varialbes with case sensitivity.

Post by jacque » Fri Jan 31, 2025 7:41 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10098
Joined: Wed May 06, 2009 2:28 pm

Re: Match varialbes with case sensitivity.

Post by dunbarx » Fri Jan 31, 2025 7:54 pm

Richmond.

Hardly an issue. Set the "useUnicode" property, and upgrade to "numToCodepoint" My only point was to offer this method as a possible solution. 8)

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9864
Joined: Fri Feb 19, 2010 10:17 am

Re: Match varialbes with case sensitivity.

Post by richmond62 » Fri Jan 31, 2025 8:10 pm

Hardly an issue.
Indeed: my second stack, which I posted before you, leveraged numToCodePoint. 8)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9982
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Match varialbes with case sensitivity.

Post by FourthWorld » Fri Jan 31, 2025 11:49 pm

richmond62 wrote:
Fri Jan 31, 2025 5:37 pm
I have had no luck with it working on variable.
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

Klaus
Posts: 14061
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Match varialbes with case sensitivity.

Post by Klaus » Sat Feb 01, 2025 10:16 am

FourthWorld wrote:
Fri Jan 31, 2025 11:49 pm
Try this:

Code: Select all

put "Hello" into s1; put "hello" into s2; set the caseSensitive to true; put (s1 is s2)
That does not count! :-D
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)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9982
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Match varialbes with case sensitivity.

Post by FourthWorld » Sat Feb 01, 2025 11:23 am

Klaus wrote:
Sat Feb 01, 2025 10:16 am
We are currently presuming, until Googie chimes in again, that the TS want to differ two VARIABLE names, not their content!
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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9864
Joined: Fri Feb 19, 2010 10:17 am

Re: Match varialbes with case sensitivity.

Post by richmond62 » Sat Feb 01, 2025 11:55 am

We are currently presuming, until Googie chimes in again, that the TS want to differ two VARIABLE names, not their content!
Why should we presume that?

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?

Klaus
Posts: 14061
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Match varialbes with case sensitivity.

Post by Klaus » Sat Feb 01, 2025 12:22 pm

OK, OK, I (EYE) presumed that. 8)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9864
Joined: Fri Feb 19, 2010 10:17 am

Re: Match varialbes with case sensitivity.

Post by richmond62 » Sat Feb 01, 2025 6:35 pm

Geen Engels?

Klaus
Posts: 14061
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Match varialbes with case sensitivity.

Post by Klaus » Sun Feb 02, 2025 12:31 am

No angels. :-D

Post Reply

Return to “Android Deployment”