AutoHotkey Community

It is currently May 26th, 2012, 11:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: November 12th, 2009, 7:15 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 12th, 2009, 8:56 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 12th, 2009, 10:12 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
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

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2009, 1:00 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2009, 4:57 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2009, 7:54 am 
Offline

Joined: August 24th, 2005, 5:29 pm
Posts: 549
Location: Berlin / Germany
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:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 15th, 2009, 3:52 am 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
Quote:
I'll never like that "implicit concatenation" feature

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

Jacques.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group