Jump to content

I need quick answer about "!=" equivalent code


TIapko
 Share

Recommended Posts

While Not $a = 5
  ; DOIT()
 WEnd

Missed code tag.

Totally wrong. That code is:

While (Not $a) = 5

Where Not $a evaluates to either True or False.

Edited by Valik
Fixed post due to broken autoit tags.
Link to comment
Share on other sites

Technically, (not $a == 5) would be more like C if you know that $a is a variant.

Discuss.

I fail to see what further misinformation achieves. This is the exact same answer James gave and is the wrong answer.
Link to comment
Share on other sites

Seeing as your tags now read "While (Not $a) = 5oÝ÷ Ùhbr¬èr·¬¦§µçhºØ¬ë-jëh×6While $a <> 5" the discussion was hard to follow.

Fixed.

More correct would be: While (Not ($a == 5)).

No, more correct would be While $a <> 5. Your code needless uses parenthesis for grouping (The outer pair). Then it needlessly performs an equality comparison and then inverts the result. Why do all that in so many steps and cause so much extra parsing to be involved when you can just use <> and get it all done in one go? That's like using this code to test for greater-than-or-equal:

If Not ($a < 3) Then
Link to comment
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
 Share

  • Recently Browsing   0 members

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