企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
false和nil为假,true、0和非nil为真 ``` --[ 0 为 true ] 这里当条件为true成立时输出 hello if(0) then print("hello") end ``` ~~~ if(布尔表达式) then --[ 布尔表达式为 true 时执行该语句块 --] else --[ 布尔表达式为 false 时执行该语句块 --] end ~~~