AutoHotkey Community

It is currently May 27th, 2012, 9:14 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: November 26th, 2011, 5:45 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Until Command wrote:
Loop Until is shorthand for the following:

Code:
Loop {
    ...
    if (Expression)
        break
}


Code:
Loop {
   obj := {}
   if obj
      break
}

Loop ; <-- infinate loop
   obj := {}
Until, obj ; not evaluating as true

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Last edited by jethrow on November 30th, 2011, 3:20 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2011, 2:51 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Thanks for reporting it. The object is evaluating to an empty string (as documented "where an object is not expected"), which is false. If and While only work because of an optimization within ExpandExpression which is designed to return "1" (true) or "" (false) instead of copying the result into the deref buffer. Fixing it is a simple matter of adding a check for Until on the appropriate line. Incidentally, the current v2 alpha works as expected, since I had already made a similar change when revising nearby code.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2011, 7:38 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Fixed by v1.1.05.03, available now.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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