AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

StringCaseSense ?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
guest
Guest





PostPosted: Thu Feb 10, 2005 2:45 pm    Post subject: StringCaseSense ? Reply with quote

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? Rolling Eyes
Back to top
BoBo
Guest





PostPosted: Thu Feb 10, 2005 3:42 pm    Post subject: Reply with quote

Is that AHK-Syntax ???? or AutoIt ????
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 10, 2005 8:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
gest
Guest





PostPosted: Sat Feb 12, 2005 1:09 pm    Post subject: Reply with quote

I understood. Thank you for teaching
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group