Created
October 25, 2009 03:04
-
-
Save x5gtrn/217863 to your computer and use it in GitHub Desktop.
test of generic for, ipairs()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local array = {["key1"] = 1, key2 = 2; 3, 4, 5; key3 = 6; 7, 8} | |
print("array size=" .. #array) | |
for i,v in ipairs(array) do | |
print("index=" .. i | |
.. " value=" .. v) | |
end | |
print("value of key1=" .. array.key1) | |
print("value of key2=" .. array.key2) | |
print("value of key3=" .. array.key3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment