官术网_书友最值得收藏!

  • Lua Quick Start Guide
  • Gabor Szauer
  • 72字
  • 2021-08-05 10:30:41

Control structures

Control structures are used to make decisions in code; they control the path of code based on a Boolean value. Lua provides the if statement for this purpose. An if statement is followed by a Boolean condition, which in turn is followed by a then/end chunk. The chunk is only executed when the Boolean condition evaluates to true.

The most basic syntax of an if statement is as follows:

主站蜘蛛池模板: 托里县| 湘乡市| 绍兴市| 揭东县| 临朐县| 宜丰县| 固安县| 富平县| 广丰县| 当雄县| 衡山县| 怀仁县| 伽师县| 齐齐哈尔市| 富蕴县| 周口市| 仁布县| 萨嘎县| 张掖市| 英吉沙县| 射阳县| 上栗县| 确山县| 冕宁县| 永春县| 寿宁县| 青冈县| 诏安县| 康定县| 峨眉山市| 柘荣县| 太谷县| 开封县| 策勒县| 台前县| 班戈县| 博野县| 巨野县| 洛隆县| 宣化县| 丹凤县|