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 

++x Bug (or parsing error) following non var ("xx"

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



Joined: 04 Dec 2006
Posts: 422
Location: Galil, Israel

PostPosted: Wed Feb 28, 2007 2:07 pm    Post subject: ++x Bug (or parsing error) following non var ("xx" Reply with quote

see http://www.autohotkey.com/forum/post-107659.html for full diggs...


in summary:

Code:
msgbox 32,,% #(z) " " ++z " " z++ " " z++ " " z
exitapp



#(byref x) {
if x
   return
x = 0
}




note: z++ works, but ++z does not...
(following quoted literal, or number constant, etc.)
++z does work following another var.


all of above WITHOUT "."
_________________
Joyce Jamce
Back to top
View user's profile Send private message
Grumpy
Guest





PostPosted: Wed Feb 28, 2007 4:15 pm    Post subject: Reply with quote

As ahklerner shown in the linked topic, this is already covered in the manual, ie. that "default concatenation" should be avoided because there are buggy cases. I don't see why you opened this topic, then.
Back to top
ahklerner



Joined: 26 Jun 2006
Posts: 1205
Location: USA

PostPosted: Wed Feb 28, 2007 8:59 pm    Post subject: Reply with quote

I would assume that Joy2DWorld opened yet another topic because Chris did not answer...
Back to top
View user's profile Send private message
Joy2DWorld



Joined: 04 Dec 2006
Posts: 422
Location: Galil, Israel

PostPosted: Wed Feb 28, 2007 11:25 pm    Post subject: Reply with quote

also, is not clear that Chris is aware of this particular issue.


While a single +x creates a possible ambiguity,

may be possible that the double plus (or minus) (eg. ++x) is sufficiently non-ambiguous to be properly parsed..


especially where x++ does work fine...

and *especially* where ++x does NOT require a period after a variable.



would seem this is fixable,

but... very least...


if is known 'required .' as prefix ... maybe easy addition to doc.


ie. intent is no complaint, but,

hope to help by bringing this specific issue to attention for either (1) fixing it if possible/reasonably easy to achieve, or (2) possible small addition to doc. to 'warn' others of the specific issue and make life smoother and happier for them in the future...

@Grumpy: fair enough ?

@Grumpy: likely am in the minority, but believe that the more accepting the language is of all types of syntax, the more robust and enjoyable it is. If something can have meaning, vs. just being an 'error', my personal vote is to give meaning... Ie. would keep the bothersome periodless concats... (but then again... do realize that is the minority view).
_________________
Joyce Jamce
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Mar 01, 2007 3:29 am    Post subject: Reply with quote

Although support could be added for this, the code to do so seems more complex than it's worth -- especially since I'm leaning toward getting rid of implicit concatenation in v2 (for reasons discussed at length in another topic).

So I've changed the docs to read: "You can also omit the period to achieve the same result (except where ambiguous such as x -y, or when the item on the right side has a leading ++ or --)."

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