lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Is it mandated by the reference manual that all implementations of Lua
> must return a single function rather than an iterator tuple for things
> like io.lines, string.gmatch, etc?

  http://www.lua.org/manual/5.1/manual.html#pdf-file:lines

  file:lines ()

  Returns an iterator function that, each time it is called, returns a
  new line from the file.

-- Roberto