lua-users home
lua-l archive

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


Hi,
Thanks for the answers. Yes I meant a list of values, I don't care the names. 
concatenating them as suggested seems to be the best solution (print probably writes them separated by spaces, indeed, but I wanted to use file:write)
Thanks
D


On Wed, Jun 26, 2013 at 5:00 PM, Javier Guerra Giraldez <javier@guerrag.com> wrote:
On Wed, Jun 26, 2013 at 9:45 AM, Daniel Barna <daniel.barna@cern.ch> wrote:
> Hi, I have a function which return a list of variables:
> function some_function()
>   return a,b,c,d;
> end


nitpicking: that function doesn't return a list of variables.  it
returns a list of values.

the values don't have names, so if you want those in your file, you're
out of luck unless you return those too.

why not return a table?  then you can write both the keys and values
to the file.

--
Javier