Lua语言学习

1,语法

语句不用分号结尾

function ... end

if .. else .. end

 

2, io库, string库, table库, OS库, 算术库, debug库

 

3, dofile来导入库文件内容

 

4.大小写敏感

5,单行命令 lua -e "print(math.sin(12))"

-l 加载一个文件

-i 进入交互模式

 

8个基本类型: nil, boolean, number, string, userdata, function, thread, table

 

多行字符串 [[]]

posted @ 2017-06-05 01:47  专属9号  阅读(148)  评论(0编辑  收藏  举报