diff options
author | Lua Team <team@lua.org> | 1994-07-08 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 1994-07-08 12:00:00 +0000 |
commit | 944fc7d7d95575f2b8023c1f3d4ac19e1369fc76 (patch) | |
tree | eabf0822f2058229cd0d49c7928683b8cf0ed88e /test/array.lua | |
parent | 8b5979a7e8b9732aa2883d2384f853d87b594770 (diff) | |
download | lua-github-1.1.tar.gz |
Lua 1.11.1
Diffstat (limited to 'test/array.lua')
-rw-r--r-- | test/array.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/array.lua b/test/array.lua new file mode 100644 index 00000000..349fb818 --- /dev/null +++ b/test/array.lua @@ -0,0 +1,15 @@ +$debug + +a = @() + +i=0 +while i<10 do + a[i] = i*i + i=i+1 +end + +r,v = next(a,nil) +while r ~= nil do + print ("array["..r.."] = "..v) + r,v = next(a,r) +end |