Search code examples
luapremake

Lua for premake4 beginners: is 'variable = {"a", "b"}' same thing as 'variable {"a", "b"}'?


In premake we have constructs like files { "**.h", "**.cpp" } would files = { "**.h", "**.cpp" } be same thing?


Solution

  • No. The construct is the same as

    files({"**.h", "**.cpp"})
    

    that is, a function call. In general you can leave out the parenthesis if a function is called with a single literal argument:

    print "Hello world!"