what does lua operator ~= mean?

点点圈 提交于 2020-03-17 10:05:11

问题


probably pretty easy, but I wonder what the ~= operator means in lua, as in

if x ~= params then

Searched but found nothing.


回答1:


the ~= is not equals

It is the equivalent in other languages of !=




回答2:


The operator ~= is exactly the negation of equality (==).

See docs.




回答3:


During compilation it gets translated to not a == b.



来源:https://stackoverflow.com/questions/34713203/what-does-lua-operator-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!