lua-users home
lua-l archive

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


> I suppose that a=f;"x = %d\n":format(123) and a=f("x = %d\n":format(123))
> would both be unambiguous.

Yes, but i the case below Lua emits an error

	a=f
	("x = %d\n"):format(123)

>>> ambiguous syntax (function call x new statement) near '('

The solution is to use a semicollon in the first statement.
--lhf