lua 之 三木运算符

在c语言中我三目运算符这么写: a?b:c

例如:

max = a>b?a:b;

在lua中我们这么写

max = a>b and a or b

运行如下:

原文地址:https://www.cnblogs.com/dzqdzq/p/3569629.html