hello.lua 232 B

12345678910
  1. -- hello.lua
  2. -- Receives a table, returns the sum of its components.
  3. io.write("The table the script received has:\n");
  4. x = 0
  5. for i = 1, #foo do
  6. print(i, foo[i])
  7. x = x + foo[i]
  8. end
  9. io.write("Returning data back to C\n");
  10. return x