lua-users home
lua-l archive

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


Paul,

> In your example, does your scope() function absolutely guarantee that the file you opened in the call to scope() will synchronously and reliably be closed after the “end” of the for loop but before the final call to print()?

The 5.4 'for' loop does (we return the file as a closin value for it). The function itself can be implemented in different ways, that's just one of them. As long as it doesn't itself cause some error (out of memory constructing the table?), the guarantee should hold.

Best regards,

--
DoubleF