- Lua Quick Start Guide
- Gabor Szauer
- 75字
- 2021-08-05 10:30:42
if
A logical control structure always starts with an if statement. As described previously, an if statement consists of the if keyword, a Boolean expression, and a then/end chunk. The then/end chunk is only executed when the Boolean condition evaluates to true. The following code sample demonstrates the basic use of an if statement:
print ("Enter your name")
name = io.read()
if #name <= 3 then
print ("that's a short name, " .. name)
end
推薦閱讀
- Java程序設計實戰(zhàn)教程
- Hands-On Image Processing with Python
- HoloLens Beginner's Guide
- Java Web及其框架技術
- HBase從入門到實戰(zhàn)
- Dependency Injection in .NET Core 2.0
- Python王者歸來
- 你不知道的JavaScript(中卷)
- 學Python也可以這么有趣
- Rust Essentials(Second Edition)
- Scientific Computing with Scala
- Learning Python Design Patterns
- 汽車人機交互界面整合設計
- WildFly Cookbook
- Mastering PowerCLI