| View previous topic :: View next topic |
| Author |
Message |
guest Guest
|
Posted: Thu Feb 10, 2005 2:45 pm Post subject: StringCaseSense ? |
|
|
| Code: | ;test1
word = AUTOHOTKEY.INI
if (word == "autohotkey.ini")
dsp1= test1: %word% == autohotkey.ini StringCaseSense=%A_StringCaseSense%
else
dsp1= test1: %word% ! autohotkey.ini StringCaseSense=%A_StringCaseSense%
;test2
word = AUTOHOTKEY.INI
if (word = "autohotkey.ini")
dsp2= test2: %word% = autohotkey.ini StringCaseSense=%A_StringCaseSense%
else
dsp2= test2: %word% ! autohotkey.ini StringCaseSense=%A_StringCaseSense%
msgbox, %dsp1%`n%dsp2% |
Result::
test1: AUTOHOTKEY.INI ! autohotkey.ini StringCaseSense=Off
test2: AUTOHOTKEY.INI = autohotkey.ini StringCaseSense=Off test1 and test2 do not bring the same result. Is this specification?  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Thu Feb 10, 2005 3:42 pm Post subject: |
|
|
| Is that AHK-Syntax ???? or AutoIt ???? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Feb 10, 2005 8:57 pm Post subject: |
|
|
By design, == is always case sensitive and = is never case sensitive. However, if both operands are numeric, = and == are the same.
This was done so that it is possible to have a case sensitive comparison and an insensitive one inside the same expression. |
|
| Back to top |
|
 |
gest Guest
|
Posted: Sat Feb 12, 2005 1:09 pm Post subject: |
|
|
| I understood. Thank you for teaching |
|
| Back to top |
|
 |
|