lua-users home
lua-l archive

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


Hi,

I'm not getting some of the examples in the slides

      t = table.pack(1, nil, 3)
      for i = 1, t.n do
      print(t[i])
      end

Does t.n give the value of' 3?

     for k, v in pairs(tab) do

What does in do in this line of code?

      function derivative(f, dx)
      dx = dx or 1e - 4
      return
      function (x)
      return(f(x + dx) - f(x)) / dx
      end
      end

I get an error message running this, from the lecture'"more on function".

Do resources like this mean I might one day use CSound in lua
interpreted by C++ without knowing C?

github.com/csound/csoundAPI_examples/tree/master/lua

Cheers,
Luke