lua学习笔记——逻辑运算符和三目运算符


isok = false;
--逻辑运算符
--规定nil为false
--print( ms and isok)
--print(4 and 5)
--print (false and 13)
--print(false and 13)
--a or b a为true 返回a 否则返回b
--print (4 and 5)
--print(4 or 5)
--三目运算符
print((isok and 4) or 5)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM