BZ易风

导航

 

2021年12月9日

摘要: lua种三目运算符后面结果不能跟false或者true 如: local isTrue = 2==2 and false or 2 lua只是模拟三目运算符,此时运算会 2==2 and false 那么就返回false false or 2 则返回2, 我们希望它返回的其实是false,那么此时只 阅读全文
posted @ 2021-12-09 17:03 BZ易风 阅读(74) 评论(1) 推荐(1) 编辑