Re: Glib::IO->add_watch not uninstalling

On Sun, 2007-02-25 at 15:46 +0100, Jeffrey Ratcliffe wrote:

The Glib::Flags operators are explained in the "This Is Now That"
section of the Glib manpage.

But in the manpage, it implies (to me at least) that there is a
difference between &, >= and *. Is there difference?

* and & return the elements that are in both sets -- evaluating this in
a bool context works because an empty set turns into false and a
non-empty set turns into true.  Note that * and & are commutative:

  a * b == b * a.

=, on the other hand, specifically tests if the first set contains the
second set -- so >= is not commutative.


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