- 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
推薦閱讀
- 演進式架構(原書第2版)
- Android開發精要
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- Rust編程從入門到實戰
- JSP開發案例教程
- Mastering macOS Programming
- Hands-On RESTful Web Services with Go
- Getting Started with SQL Server 2012 Cube Development
- 基于Swift語言的iOS App 商業實戰教程
- INSTANT Django 1.5 Application Development Starter
- TradeStation交易應用實踐:量化方法構建贏家策略(原書第2版)
- Android系統級深入開發
- 速學Python:程序設計從入門到進階
- 軟件測試綜合技術
- 深入實踐Kotlin元編程