- Lua Quick Start Guide
- Gabor Szauer
- 67字
- 2021-08-05 10:30:43
while loops
Syntactically, a while loop starts with the while keyword, followed by a Boolean condition and a do/end chunk. The loop will keep executing the chunk of code so long as the Boolean condition evaluates to true:
x = 10 -- Initialize a "control" variable
while x > 0 do -- Boolean condition: x > 0
print ("hello, world")
x = x - 1 -- Decrement the "control" variable
end
推薦閱讀
- Learning LibGDX Game Development(Second Edition)
- Spring Boot開發與測試實戰
- Magento 2 Theme Design(Second Edition)
- The Computer Vision Workshop
- 零基礎學Java(第4版)
- 名師講壇:Java微服務架構實戰(SpringBoot+SpringCloud+Docker+RabbitMQ)
- Elasticsearch Server(Third Edition)
- Apache Spark 2.x for Java Developers
- Visual FoxPro程序設計習題集及實驗指導(第四版)
- PHP從入門到精通(第4版)(軟件開發視頻大講堂)
- Orchestrating Docker
- Oracle數據庫編程經典300例
- JavaScript悟道
- Mastering OAuth 2.0
- 安卓工程師教你玩轉Android