Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

table lua

    a = {}
    x = "y"
    a[x] = 10                 -- put 10 in field "y"
    print(a[x])   --> 10      -- value of field "y"
    print(a.x)    --> nil     -- value of field "x" (undefined)
    print(a.y)    --> 10      -- value of field "y"
Source by www.lua.org #
 
PREVIOUS NEXT
Tagged: #table #lua
ADD COMMENT
Topic
Name
3+3 =