| View previous topic :: View next topic |
| Author |
Message |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Thu Nov 12, 2009 6:15 am Post subject: Error for space between func name/open parenthesis |
|
|
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 |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Thu Nov 12, 2009 7:56 am Post subject: |
|
|
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 |
|
 |
jethrow
Joined: 24 May 2009 Posts: 1907 Location: Iowa, USA
|
Posted: Thu Nov 12, 2009 9:12 pm Post subject: |
|
|
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 |
_________________
- in case I forgot to smile
Basic Webpage Controls
COM Object Reference |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Fri Nov 13, 2009 12:00 am Post subject: |
|
|
Just the same with:
All will be fine if used like this.
| Code: | x:=0, 1 (2,3)
x:=0, 1 . (2,3) |
|
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Fri Nov 13, 2009 3:57 am Post subject: |
|
|
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 |
|
 |
nick
Joined: 24 Aug 2005 Posts: 549 Location: Berlin / Germany
|
Posted: Fri Nov 13, 2009 6:54 am Post subject: |
|
|
I'll never like that "implicit concatenation" feature, IMO it's bad design. But it's certainly much to late to abolish it. _________________ nick  |
|
| Back to top |
|
 |
JBensimon
Joined: 16 Nov 2004 Posts: 153 Location: New York
|
Posted: Sun Nov 15, 2009 2:52 am Post subject: |
|
|
| Quote: | | I'll never like that "implicit concatenation" feature |
Not a fan either, so I always use the explicit "." concatenator.
Jacques. |
|
| Back to top |
|
 |
|