Page 2 of 3

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 4:21 pm
by richmond62
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.

Posted: Fri Jan 31, 2025 4:25 pm
by Klaus
Well, it's about time that Googie chimes in again. 8)

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 4:39 pm
by richmond62
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)

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 5:22 pm
by FourthWorld
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.

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 5:37 pm
by richmond62
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

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 7:41 pm
by jacque
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.

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 7:54 pm
by dunbarx
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

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 8:10 pm
by richmond62
Hardly an issue.
Indeed: my second stack, which I posted before you, leveraged numToCodePoint. 8)

Re: Match varialbes with case sensitivity.

Posted: Fri Jan 31, 2025 11:49 pm
by FourthWorld
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)

Re: Match varialbes with case sensitivity.

Posted: Sat Feb 01, 2025 10:16 am
by Klaus
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)
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)

Re: Match varialbes with case sensitivity.

Posted: Sat Feb 01, 2025 11:23 am
by FourthWorld
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?

Re: Match varialbes with case sensitivity.

Posted: Sat Feb 01, 2025 11:55 am
by richmond62
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?

Re: Match varialbes with case sensitivity.

Posted: Sat Feb 01, 2025 12:22 pm
by Klaus
OK, OK, I (EYE) presumed that. 8)

Re: Match varialbes with case sensitivity.

Posted: Sat Feb 01, 2025 6:35 pm
by richmond62
Geen Engels?

Re: Match varialbes with case sensitivity.

Posted: Sun Feb 02, 2025 12:31 am
by Klaus
No angels. :-D