Lua for premake4初学者:'variable = {"a","b"}'与'variable {"a","b"}'相同?

Rel*_*lla 1 lua premake

在premake我们有同样的结构 files { "**.h", "**.cpp" }files = { "**.h", "**.cpp" }是一回事吗?

Phi*_*ipp 5

不.构造与.相同

files({"**.h", "**.cpp"})
Run Code Online (Sandbox Code Playgroud)

也就是函数调用.通常,如果使用单个文字参数调用函数,则可以省略括号:

print "Hello world!"
Run Code Online (Sandbox Code Playgroud)