lua-users home
lua-l archive

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


On 10/08/2011 09:49, Dirk Laurie wrote:
On Wed, Aug 10, 2011 at 02:14:37AM +0200, Steve Litt wrote:
Can anyone explain the benefit of:

a, b = 1, 2

Can also be useful for init:
local a, b, c = 1, 1, 1
because you cannot do:
a = b = c = 1
like in C.

In other languages like Java, I put one variable per line, but in Lua, I am more informal...

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --