![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lua
qq_38112257
这个作者很懒,什么都没留下…
展开
-
lua学习笔记(五)
--编译 --dofile loadfile assert --dofile 能够编译并执行一个文件 loadfile 只是编译一个文件 assert引发错误,如果它的参数是错误 function dofile(filename) local f = assert(loadfile(filename)) return f() end --loadstring 从一个字符串中读取代码 i ...原创 2018-08-03 15:26:35 · 125 阅读 · 0 评论 -
lua学习笔记(六)
--创建协程,coroutine表中名为create的函数创建协程,返回值为thread类型 co = coroutine.create(function () print("Hello") end) print(co) --查看协程状态 suspended running dead normal四种状态 print(coroutine.status(co)) --唤醒协程 coroutine.r...原创 2018-08-03 15:28:04 · 161 阅读 · 0 评论