added an ipairs() table traversal function like the one from the basic library
git-svn-id: svn://anubis/anaglym/trunk@227 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
c4f6310c2d
commit
65ee4ccab2
12
ag.cc
12
ag.cc
@ -82,6 +82,18 @@ namespace ag
|
||||
" return next, table, nil\n"
|
||||
"end\n"
|
||||
|
||||
"ipairs = function(table)\n"
|
||||
" local iter_func = function(t, i)\n"
|
||||
" i = i + 1\n"
|
||||
" if t[i] == nil then\n"
|
||||
" return nil\n"
|
||||
" else\n"
|
||||
" return i, t[i]\n"
|
||||
" end\n"
|
||||
" end\n"
|
||||
" return iter_func, table, 0\n"
|
||||
"end\n"
|
||||
|
||||
"ag.createAMotor = function()\n"
|
||||
"end\n"
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user