User:Hajo/test2
Jump to navigation
Jump to search
Table-test2
x,y,z
Lua - Online-IDEs
Example - Formatting a table:
Prog1
-- table x,y,z
n=1
y=0
for x = -n, n do
for z = -n, n do
--print(x,y,z)
print( string.format("%3d %2d %2d", x,y,z) )
end
end
Output
-1 0 -1 -1 0 0 -1 0 1 0 0 -1 0 0 0 0 0 1 1 0 -1 1 0 0 1 0 1
Prog2
...