Lua中到底有没有空语句呢?

来源:互联网 发布:lrc校验vb 编辑:程序博客网 时间:2024/05/21 21:21

官网5.1的文档说:

There are no empty statements and thus ';;' is not legal.

没有空语句,因此 ';;' 是非法的。


官网5.2的文档说:

Lua has empty statements that allow you to separate statements with semicolons, start a block with a semicolon or write two semicolons in sequence

Lua有空语句,可以让你用分号将语句分开,可以以一个分号开始一个block,可以连续写两个分号。


可见,5.2之前,是不能在Lua中使用空语句的。从5.2开始,才能在Lua中使用空语句。


0 0