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 

Bug within IF

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Gfy
Guest





PostPosted: Tue Apr 08, 2008 2:26 pm    Post subject: Bug within IF Reply with quote

Hallo
I have make a mistake in a IF and found so a Bug

Code:
a := 10

if a = 10
   msgbox a=10
   
if a = 10 )
   msgbox a = 10 )
   
if( a = 10 )
   msgbox ( a = 10 )


In the 3te If i have forgot the (. I get no Compiling Error and the code isent execute.
Back to top
Oberon



Joined: 18 Feb 2008
Posts: 408

PostPosted: Tue Apr 08, 2008 2:45 pm    Post subject: Reply with quote

This is the expected result; for non-expresson if statements the right hand side operator is a string. See FAQ: When exactly are variable names enclosed in percent signs?
_________________
Back to top
View user's profile Send private message
sasaa
Guest





PostPosted: Wed Apr 16, 2008 6:02 pm    Post subject: Reply with quote

Oberon wrote:
This is the expected result; for non-expresson if statements the right hand side operator is a string. See FAQ: When exactly are variable names enclosed in percent signs?

ARRGH! Laughing
Back to top
Piz



Joined: 16 Feb 2008
Posts: 46

PostPosted: Thu Apr 17, 2008 1:30 pm    Post subject: Reply with quote

sasaa wrote:
Oberon wrote:
This is the expected result; for non-expresson if statements the right hand side operator is a string. See FAQ: When exactly are variable names enclosed in percent signs?

ARRGH! Laughing

ARRGH indeed. That's why I always use parens in my IF statements.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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