【1】逻辑操作符and、or和not
应用示例:
print( and ) --
print(nil and ) -- nil
print(false and ) -- false
print( or ) --
print(false or ) -- print(( and ) or ) --
print((false and ) or ) --
print(( and false) or ) -- print(not nil) -- ture
print(not false) -- true
print(not ) -- false
print(not not nil) -- false x =
v =
y = x or v
print(y) --
【2】总结
遵循其他语言的规则:a and b 见假则假; a or b 见真则真;
Good Good Study, Day Day Up.
顺序 选择 循环 总结