lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hallo,

Andreas Falkenhahn wrote:

Is it intended that " print "hello" " without brackets is syntactically
correct?  Or is it a bug?

Greets


For convenience, if the sole argument of a function is a string or a table, you may omit the brackets.

f'teste' = f('teste')
f"teste" = f("teste")
f[[teste]] = f([[teste]])
f{a = 1, b = 2} = f({a = 1, b = 2})

-alex