+ 2

=! vs != ?

which is diference between =! and != ?

15th May 2017, 6:35 PM
kevin lico
kevin lico - avatar
5 Respuestas
+ 7
Actually =! is not one operator but two != means NOT EQUAL =! will assign the invers value of a var : var1 = !var2
15th May 2017, 6:47 PM
nouseforname
nouseforname - avatar
+ 2
=! is actually 2 operators. the first one is assignment "=", the second is the logical operator NOT "!". For example x =! true means that "x" value is "false". On the other hand, "!=" is a relational operator and can be used, for example, in the condition of an "if" statement.
15th May 2017, 7:52 PM
Pedro Cruz
Pedro Cruz - avatar
0
There is no =! operator. It's bad coding style. bad: x =! y; good: x = !y; Both ways might work though, giving x the invers of y.
30th Sep 2018, 7:44 AM
Daniel Fietkau
Daniel Fietkau - avatar
0
==
26th Dec 2021, 3:45 PM
ابوجبريل ابوجبريل
ابوجبريل ابوجبريل - avatar
0
مالفرق بين 5=8 5==8
26th Dec 2021, 3:53 PM
ابوجبريل ابوجبريل
ابوجبريل ابوجبريل - avatar