lua-users home
lua-l archive

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


On 26/06/13 15:45, Daniel Barna wrote:
> Hi, I have a function which return a list of variables:
> function some_function()
>   return a,b,c,d;
> end
>
> I would like to write this to a file, using a whitespace as the
> separator, something like this:
> some_file:write(some_function());
>
> How can I do this?

Quick and easy:

file:write(table.concat({some_func()}, " "))

Scott