Jump to content

Recommended Posts

  • Administrators
Posted

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/

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...