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 

Error for space between func name/open parenthesis

 
Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
sinkfaze



Joined: 18 Mar 2008
Posts: 5043
Location: the tunnel(?=light)

PostPosted: Thu Nov 12, 2009 6:15 am    Post subject: Error for space between func name/open parenthesis Reply with quote

I just saw the problem of no error on script load when a space exists between func name and the open parenthesis happen in this thread so I thought it was fair to bring up again. Obviously Chris has had this syntax enhancement in the pipe for a while, but having no error thrown at all can present a very ugly problem for an unwitting user.

I'm sure there are inherent problems with coding an effective way to catch this error correctly in scripts, but alas, I have no insight into the programming aspect of AHK.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Sean



Joined: 12 Feb 2007
Posts: 2462

PostPosted: Thu Nov 12, 2009 7:56 am    Post subject: Reply with quote

There is no syntax error in it, it'll just be an implicit concatenation in AHK.
Code:
test(x,y,z){
   MsgBox, % x "|" y "|" z
}
test:="test"
v := test (1,2,3) ; test . (1,2,3)
MsgBox % v
Back to top
View user's profile Send private message
jethrow



Joined: 24 May 2009
Posts: 1907
Location: Iowa, USA

PostPosted: Thu Nov 12, 2009 9:12 pm    Post subject: Reply with quote

Though I agree with Sean, this still doesn't seem consistent (unless I'm just missing what Sean is meaning). Take for example:
Code:
RegExReplace ("AutoHotkey","key") ; <-- No Error - just returns the first parameter
RegExReplace . ("AutoHotkey","key") ; <-- Causes Error

_________________
Very Happy - in case I forgot to smile
Basic Webpage Controls
COM Object Reference
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Sean



Joined: 12 Feb 2007
Posts: 2462

PostPosted: Fri Nov 13, 2009 12:00 am    Post subject: Reply with quote

Just the same with:
Code:
1 (2,3)
1 . (2,3)

All will be fine if used like this.
Code:
x:=0, 1 (2,3)
x:=0, 1 . (2,3)
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5043
Location: the tunnel(?=light)

PostPosted: Fri Nov 13, 2009 3:57 am    Post subject: Reply with quote

Well I guess is my point is I'd like for there to be an error when that occurs in the script. Hence the reiterated wish. Given the amount of time it has taken to this point I'm assuming it's a difficult fix, though.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
nick



Joined: 24 Aug 2005
Posts: 549
Location: Berlin / Germany

PostPosted: Fri Nov 13, 2009 6:54 am    Post subject: Reply with quote

I'll never like that "implicit concatenation" feature, IMO it's bad design. But it's certainly much to late to abolish it.
_________________
nick Wink
Back to top
View user's profile Send private message
JBensimon



Joined: 16 Nov 2004
Posts: 153
Location: New York

PostPosted: Sun Nov 15, 2009 2:52 am    Post subject: Reply with quote

Quote:
I'll never like that "implicit concatenation" feature

Not a fan either, so I always use the explicit "." concatenator.

Jacques.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Wish List 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