![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
速成指南
S0nrEir
fvck it
展开
-
lua备忘录(一)
lua中有八种基本类型,需要注意的是(function、thread、nil这三种类型) print(type(10.0))--使用type函数可以获得一个变量的类型信息 print(type(false)) print(type("123")) 逻辑运算: a=30 b=20 c=(a>b) and a or b --lua中这个式子相当于:c=a>b? a:b print(c)原创 2017-11-09 01:42:08 · 153 阅读 · 0 评论 -
lua备忘录(二)
--lua的do~while循环是这样写的: --[[ i=1 repeat --do print(i) --注意,repeat循环是不用以do作为代码块的开端的 i=i+1 until i>=10 --while(i=10的时候结束循环 ]] --lua中的foreach循环: --[[ table_1={"one","two","three","four","five"} table_2原创 2017-11-13 01:02:46 · 154 阅读 · 0 评论