lua-users home
lua-l archive

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


how about

a = "aaa"
tbl = { a = a, b = a }

?

On 27 September 2017 at 06:38, hz . <abrash_han@hotmail.com> wrote:
hi, 

Is there a way to init table field as:

tbl = {
 a = ‘aaa’,
 b = a,
}

where b is inited as ‘aaa’?

Or what’s the most simple approach to do this.

Thanks
Best Regards
Zhao Han



--
Etiene Dalcol

Software Engineer @ Red Badger 
Lua Space http://lua.space
LuaConf http://luaconf.com