Lua table advanced usage, function names as subscripts

Lua table advanced usage, function names as subscripts

function x()
    print("Hello World")
end

local a = {
	[x] = 1
}

print(a[x])

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example