Sign in to follow this  
Followers 0
Jon

v3.0.86 available in unstable

3 posts in this topic




I've had an attempt at fixing the whole boolean comparison thing, so in code like

if func1() And func2() OR func3() then msgbox(0, "", "True")
msgbox(0, "", "Fin")

Func func1()
  msgbox(0, "", "Func1()")
  return 0
EndFunc

Func func2()
  msgbox(0, "", "Func2()")
  return 0
EndFunc

Func func3()
  msgbox(0, "", "Func3()")
  return 1
EndFunc

func2() would never be executed.

It seems to work OK, but it was very nasty and I'm sure I've not thought of something. The limitation (ish) is that it actually skips code when it needs to without checking what it is skipping, so there may be situations where a badly formatted expression is skipped without error. For example in the code above if func2() was written funcnsdhshkdsj() no error would be given as that part was never evaluated.

Edit: uploaded to /unstable/

Share this post


Link to post
Share on other sites

Nice :whistle: Now the following code, for example, does not crash with an index out-of-bounds error:

Dim $array[10]

$index = -1

If ($index >= 0) And ($array[$index] = "foo") Then sleep(10)

Of course the above could be rewritten with nested If statements....


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0