[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Array Logical Operators
- From: "Antonio Scuri" <scuri@...>
- Date: Fri, 21 Oct 2011 12:34:18 -0200
Yes, I meant 'not', 'and' and 'or'.
Best,
Scuri
> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org]
> On Behalf Of Elias Barrionovo
> Sent: sexta-feira, 21 de outubro de 2011 12:23
> To: Lua mailing list
> Subject: Re: Array Logical Operators
>
> Wouldn't those be metamethods for *relational* operators? I'd think
> the logical operators are 'not', 'and' and 'or'.
>
> On 10/21/11, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> > 2011/10/21 Antonio Scuri <scuri@tecgraf.puc-rio.br>:
> >
> >> So, wouldn?t be interesting to Lua to have metamethods for Logical
> >> operators too?
> >>
> >
> > >From the Lua 5.2 manual (but I think it is older than that):
> >
> > "eq": the == operation. The function _getequalhandler_ defines how
> Lua
> > chooses a metamethod for equality. A metamethod is selected only when
> > both values being compared have the same type and the same metamethod
> > for the selected operation.
> >
> > Also "le" and "lt".
> >
> > It is a rare pleasure to be able to assist someone with an e-mail
> > address like yours :-)
> >
> > Dirk
> >
> >
>
> --
> Sent from my mobile device
>
> NI!