lua-users home
lua-l archive

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


function SpilteArray(Array)
--nCount = Array[0];

return 1,2,3,4  //is ok
        /*
            how auto do it?
            for example, Array has 4 element.
            return Array[1], Array[2], Array[3], Array[4]

       */
end

TestArray={3,2,3,4}
sum = Average(SpilteArray(TestArray))   //Average is C++ function.