Jump to content

"not" vs "<>"


masonje
 Share

Recommended Posts

But both should have ended up with the same outcome right? Why are the two statements not the same?

nope for example:

$Toggle = False

$Toggle = Not Toggle

MsgBox(0,"toggle", $Toggle)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

I lost 2 days of logs and it's my fault for not testing, but I ASSumed the above statement worked fine.

if not ($clientCurUsr = "nolog") Then

endif

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

if not ($clientCurUsr = "nolog") Then

endif

Cheers

Kurt

forgot about using it that way, I try to stay away from negative evaluations tho.

Sometimes have to.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

@gafrost

If you refer to negative evalutions as to being poor syntax, I totally agree.

; Good syntax (checking not condition)
If Not $condition Then

; Poor syntax (checking equal condition and then not condition)
If Not ($condition = $condition) Then

; Good syntax (checking not equal condition)
If $condition <> $condition Then

The last checks for unequal condition. The 2nd does a long way of doing the same. Checking if equal and then not in the same line is poor syntax.

:lmao:

Edited by MHz
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...