Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In what version was the (...) introduced in Lua functions as arguments?

This as the most simple example as I can imagine:

function NewPrint(...)
    print("printed:", ...)
end

NewPrint("Hi")

Please note, I haven't actually done Lua for a while, I might have missed some syntax.

like image 391
Frederik Spang Avatar asked Mar 23 '23 12:03

Frederik Spang


1 Answers

As per the Lua.org documentation , it was Lua 5.1 .

Lua 5.1 was released on 21 Feb 2006. Its main new features were a new module system, incremental garbage collection, new mechanism for varargs, new syntax for long strings and comments, mod and length operators, metatables for all types, new configuration scheme via luaconf.h, and a fully reentrant parser.

like image 81
AllTooSir Avatar answered Mar 30 '23 01:03

AllTooSir