- Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtest.lua
More file actions
Latest commit
34 lines (25 loc) · 362 Bytes
/
Copy pathtest.lua
File metadata and controls
34 lines (25 loc) · 362 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
localarray=require"array"
locala=array()
a[11] =11
a[9] =9
a[7] =7
a[3] =3
a[5] =5
a[1] =1
a[4] =nil
a[11] =nil
fork,vinnext,ado
print(k,v)
end
print"for k,v in pairs(a)"
fork,vinpairs(a) do
print(k,v)
end
print"for k,v in ipairs(a)"
fork,vinipairs(a) do
print(k,v)
end
print"for i=1,#a"
fori=1,#ado
print(i, a[i])
end