当前位置 : 主页 > 网络编程 > lua >

lua中chunk和block之间的区别是什么

来源:互联网 收集:自由互联 发布时间:2021-06-23
lua中chunk和block之间的区别是什么?我无法理解什么是块! 已被问到并在此处提出: http://lua-users.org/lists/lua-l/2012-06/threads.html#00723 从5.2手册: The unit of execution of Lua is called a chunk. Synta
lua中chunk和block之间的区别是什么?我无法理解什么是块! 已被问到并在此处提出: http://lua-users.org/lists/lua-l/2012-06/threads.html#00723

从5.2手册:

The unit of execution of Lua is called a chunk. Syntactically, a chunk is simply a block: chunk ::= block

从罗伯托的口中:

The fact that a chunk is a block does not mean that any block is a chunk. Chunks do not nest (unlike blocks). A chunk is an outermost block which you feed to “load”.

网友评论