![]() For userdata, the _tostring metamethod is invoked by nature of using tostring.Īs far as functions accepting arguments goes: if you are only passing a single argument to a function, Lua allows you to bypass parenthesis for values of type string or table. All arguments passed to print have tostring called on them. Print is a function that accepts variable arguments (represented as …), which means you can pass any number of arguments to it. There are four or so valid ways to write quotes in Lua: print("Hello world") - Most common Despite them being quotes, they sport an unaccepted unicode character. If the quotes were incorrect, it’d throw an error - your quotes threw an error because they’re different symbols altogether. This is wildly off-topic, but I figure it’s worth addressing: this is a valid way to write quotes.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |