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 

Strange behavior when calling a function after a '}'

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



Joined: 08 Jun 2006
Posts: 238

PostPosted: Sun Jul 29, 2007 11:53 pm    Post subject: Strange behavior when calling a function after a '}' Reply with quote

Both this

Code:
Loop {
  Sleep 1000
} function()


function() {

}


and this

Code:
Loop {
  Sleep 1000
} function(p1)


function(p1) {

}


yields an error message.

This, however, is fine:

Code:
Loop {
  Sleep 1000
} function(p1, p2)


function(p1, p2) {

}


So you need at least two parameters to call a function on the same line as a closing brace - that seems buggy Smile
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Mon Jul 30, 2007 1:56 pm    Post subject: Reply with quote

Although I don't think it was intended or documented that anything other than an ELSE be supported after a '}', it's clearly desirable. It will be fixed in the next update.

Thanks.
Back to top
View user's profile Send private message Send e-mail
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