Something went wrong. Try again.
OpenMW is an open implementation of the Morrowind engine
Something went wrong. Try again.
788 B · 52 lines
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253Iterable types==============
.. include:: version.rst
List Iterable-------------
An iterable with defined size and order.
.. code-block:: Lua
-- can iterate over the list with pairs for i, v in pairs(list) do -- ... end
.. code-block:: Lua
-- can iterate over the list with ipairs for i, v in ipairs(list) do -- ... end
.. code-block:: Lua
-- can get total size with the size # operator local length = #list
.. code-block:: Lua
-- can index the list with numbers for i = 1, length do list[i] end
Map Iterable------------
An iterable with undefined order.
.. code-block:: Lua
-- can iterate over the map with pairs for k, v in pairs(map) do -- ... end
.. code-block:: Lua
-- can index the map by key map[key]