6.1.4 Logic Operation


INTEK MACRO has the function of logic operation, the result of operation is "0" or "non-zero".


Logic operations are often combined with conditional sentences.


The logical operators are as follows:

==

;equal to

!=

;not equal to

>=

;greater than or equal to

<=

;less than or equal to

>

;greater than

<

;less than

&

;Intersection, logical and

¦

;Union, logical or

!

;Logical negation


Example 1:

#3=8;

#4=9;

#7=(#3==#4);

Then the value of variable #7 is "zero".


#3=7;

#4=7;

#7=(#3==#4);

Then the value of variable #7 is "non-zero".


Example 2:

#251=20;

#252=21;

#100=(#251!=#252);

Then variable #100 value "non-zero".


Example 3:

#250=10;

#253=4;

#252=8;

#100=9;

#121=0;

#120=1;

#40=((#250-#253)>#252)&(#100>=(#121+#120));

Then variable #40 is "zero".