lua-users home
lua-l archive

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


>>>>> "Patrick" == Patrick Donnelly <batrick@batbytes.com> writes:

 Patrick> For io.lines, Lua automatically closes the file after the last
 Patrick> (successful) line. Unfortunately, there's no integration with
 Patrick> the generic for loop in Lua 5.4.

Huh?

In 5.4, io.lines explicitly _does_ integrate with the generic for loop
to ensure the file is closed (if it was opened and isn't just using
io.input). What makes you think there is not?

-- 
Andrew.