| View previous topic :: View next topic |
| Author |
Message |
CarlosTheTackle
Joined: 19 Oct 2004 Posts: 102
|
Posted: Sun May 01, 2005 11:54 pm Post subject: Possible bug with Case Sensitivity |
|
|
It seems that the case sensivity is not working correctly when comparing strings in function form:
| Code: | STRINGCASESENSE, On
a=t
b=T
If (a=b)
MsgBox, Yes |
This code yields 'Yes', whereas this code:
| Code: | STRINGCASESENSE, On
a=t
b=T
If a=%b%
MsgBox, Yes |
does not, as expected.
C |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Mon May 02, 2005 10:51 am Post subject: |
|
|
| Although this behavior might seem counterintuitive, it's intentional. It was done this way so that it's possible to have a case insensitive comparison inside the same expression with a case sensitive one. This is documented in the fineprint of the operator table: "The == operator behaves identically to = except when either of the inputs is not a number, in which case == is always case sensitive and = is always case insensitive." |
|
| Back to top |
|
 |
CarlosTheTackle
Joined: 19 Oct 2004 Posts: 102
|
Posted: Mon May 02, 2005 11:00 am Post subject: |
|
|
Ah, that wretched fine print again.
Thanks Chris,
C. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Mon Apr 30, 2007 11:30 am Post subject: |
|
|
| Chris wrote: | | "The == operator behaves identically to = except when either of the inputs is not a number, in which case == is always case sensitive and = is always case insensitive." |
It would be nicer if a Related link was provided in StringCaseSense. I lost two hours before I opted to search the forum.
Thank You.  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Mon Apr 30, 2007 11:38 am Post subject: |
|
|
The StringCaseSense page was recently updated; so it's possible you don't have the latest version. It says, "This setting applies to: Expression comparison operators (except ==)."
So I think it's pretty clear now. If it isn't, please suggest specific changes to the wording. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Mon Apr 30, 2007 12:21 pm Post subject: |
|
|
| Chris wrote: | | it's possible you don't have the latest version. |
True , I have been using 1.0.46.09.
It is very clear now.
Thank you.  |
|
| Back to top |
|
 |
|