Welcome! Log In Create A New Profile

Advanced

Can someone tell me if there is a difference between these statements ...

Posted by Georgio 
Is the following code (in this instance) different from the other?

code #1FOR Subscript = 1 _TO_ TAB_Tab1..Occurrence
IF NOT Subscript = 7 TAB_Tab1[Subscript]..Visible = False
END
END

code #2
FOR Subscript = 1 _TO_ TAB_Tab1..Occurrence
IF Subscript <> 7 TAB_Tab1[Subscript]..Visible = False
END
END

Thanks!
Georgio
Hi Giorgio
Probabely a boobytrap, but in my opinion there is no difference.
HTH
Swissstephan
Hi,

I made a test just for the fun, and the only difference I see is execution time. <> is faster than NOT =.
ha,hb,hc are Time
na,nb are int
da,db are Duration
FOR j = 1 TO 10
	na=0
	nb=0
	ha = Now()
	FOR i = 1 TO 2000000
		IF i<>7 THEN na++
	END
	hb = Now()
	FOR i = 1 TO 2000000
		IF NOT i=7 THEN nb++
	END
	hc = Now()
	da=hb-ha
	db=hc-hb
	Trace("<>"+na,da,"","N="+nb,db)
END
Useless, but fun. On my PC I get a diff. in favour of <>.

<>1999999 0000000310 N=1999999 0000000300
<>1999999 0000000270 N=1999999 0000000280
<>1999999 0000000260 N=1999999 0000000300
<>1999999 0000000250 N=1999999 0000000300
<>1999999 0000000260 N=1999999 0000000280
<>1999999 0000000270 N=1999999 0000000280
<>1999999 0000000270 N=1999999 0000000290
<>1999999 0000000270 N=1999999 0000000280
<>1999999 0000000270 N=1999999 0000000280
<>1999999 0000000260 N=1999999 0000000300
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: