lua-users home
lua-l archive

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


  Hi,

 

  I created a class for arrays that use the arithmetic and relational operators. But I would like also to implement logical operators so I can write:

 

d = a<b and b<c

 

  I defined the result of the relational operators as another array of booleans with the result for each element. So naturally the logical operators would have to return also an array of booleans.

 

  I don’t need to define the meaning of “if (a<b)”, it can be an error.

 

  So, wouldn’t be interesting to Lua to have metamethods for Logical operators too?

 

Best Regards,

Antonio Scuri