在c语言中我三目运算符这么写: a?b:c
例如:
max = a>b?a:b;
在lua中我们这么写
max = a>b and a or b
运行如下:
lua 之 三木运算符,布布扣,bubuko.com
lua 之 三木运算符
原文:http://www.cnblogs.com/dzqdzq/p/3569629.html