lua-users home
lua-l archive

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

I didn't understand the relation between those two functions. Could you elaborate what you are trying to do or what are your needs?

Very simple. I have this lua function in a file named "test.lua"

function sum_tab(tab)
  local sum
  sum = 0
  for i = 1,table.getn(tab) do
        sum = sum + tab[i]
  return sum
1. how to pass to this function an array of doubles;
2. how to read the returned value.