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 

Unexpected Result (left to right paramater passing)
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Sean



Joined: 12 Feb 2007
Posts: 1240

PostPosted: Thu Oct 04, 2007 2:22 am    Post subject: Reply with quote

Laszlo wrote:
Is this just an intellectual exercise, a challenge?

I did it mainly for fun. I like figuring out things, especially doing it in ad hoc way as it usually amplifies the fun to the extreme. So, I avoided reading the source etc as it would greatly reduce the fun, which will become the next step to take if I'm really serious about it.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10463

PostPosted: Tue Nov 13, 2007 6:49 pm    Post subject: Reply with quote

This was an interesting discussion. Since I don't think it would be easy to change this behavior (especially not without giving up performance), I've added the following to the functions page:

If a parameter in a function-call resolves to a variable (e.g. Var or ++Var or Var*=2), other parameters to its left or right can alter that variable before it is passed to the function. For example, func(Var, Var++) would unexpectedly pass 1, 0 when Var is initially 0, even when the function's first parameter is not ByRef. Since this behavior is counterintuitive, it might change in a future release.

Sorry for the confusion.
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
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
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