lua-users home
lua-l archive

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


>     m3 = (m1 * m2):invert()

This is the price we pay for having the semicolon optional after a
statement. The ':' denotes a call, and can be used as a statement by
itself. Therefore, if the previous expression were correct, the following
one should be, too:

  (m1*m2):print()

But now, if the previous statement was "i=a", we would have

  i=a
  (m1*m2):print()

and the interpreter would read this as "i=a(m1*m2):print()" (as it
actually does). I do not know any "elegant" solution to this problem.

-- Roberto