Passing table without parentheses in lua giving error -
The following gives me an error 'despite the syntax error' person ', although in this frequently asked question () Figures: "So cleverly uses the fact that Lua will accept a function argument without brackets if the argument is a string or a table"
function class (CLS) return class End person = {} class person print (person) me Yes, what is missing? If I change the class person to the "person" class, then it works, but often statistics should work with both the string and the tables.
Brackets can be left only when there is only one argument, and logic string literally or The table is the manufacturer.
In your example, syntax, you can call the class 'Foo' or class {} , but class person No, because person is a variable, not a table maker. / P>
Comments
Post a Comment