在Lua中,一切都是变量,除了关键字。
1. 词法规范
在Lua中,标识符可以是由任意字母、数字和下划线构成的字符串,但是不能以数字开头。
下面是Lua得关键字,关键字是不能作为变量的。
and | break | do | else | elseif | |
end | false | for | function | if | |
in | local | nil | not | or | |
repeat | return | then | true | until | while |
在Lua中,一切都是变量,除了关键字。
1. 词法规范
在Lua中,标识符可以是由任意字母、数字和下划线构成的字符串,但是不能以数字开头。
下面是Lua得关键字,关键字是不能作为变量的。
and | break | do | else | elseif | |
end | false | for | function | if | |
in | local | nil | not | or | |
repeat | return | then | true | until | while |