- 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
推薦閱讀
- Mastering OpenLayers 3
- Learning Single:page Web Application Development
- Mobile Application Development:JavaScript Frameworks
- 實用防銹油配方與制備200例
- 三維圖形化C++趣味編程
- Mastering Python High Performance
- C語言程序設(shè)計
- Hands-On Functional Programming with TypeScript
- Learning iOS Security
- ASP.NET Web API Security Essentials
- Simulation for Data Science with R
- Ext JS 4 Plugin and Extension Development
- Web開發(fā)的平民英雄:PHP+MySQL
- Selenium WebDriver Practical Guide
- Java多線程并發(fā)體系實戰(zhàn)(微課視頻版)