lua-users home
lua-l archive

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


On Mar 5, 2017, at 1:32 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> io.open("results.txt","w"):write(table.concat(results,"\n")):close()
> 
> Without colon notation, how far can we get?

If there we no implicit self and no ':' sugar this would be written something like this:

local file = io.open("results.txt", "w")
io.write(file, table.concat(results, "\n"))
io.close(file)

Petri