Home  Contents

pairs

Global Lua Commands

SYNOPSIS

pairs(t)

DESCRIPTION

Returns three values: the next function, the table t, and nil, so that the construction

for k,v in pairs(t) do body end

will iterate over all key-value pairs of table t.

NOTES

See function next for the caveats of modifying the table during its traversal.

RETURN VALUE

Returns three values.