Re: Gtk2::Gdk::Atom overload !=
- From: Kevin Ryde <user42 zip com au>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk2::Gdk::Atom overload !=
- Date: Wed, 21 May 2008 07:55:27 +1000
Torsten Schoenfeld <kaffeetisch gmx de> writes:
Are you saying that "! ($h1 != $h2)" is not true on your system?
Umm. Yep. (i386 debian gtk2-perl 1.181 with perl 5.10.0 ...)
h1 and h2 both "hello" come out as equal if you ask "==" but then also
as unequal if you ask "!=". Example program below, if I can avoid
confusing myself with double negatives ...
use strict;
use warnings;
use Gtk2 '-init';
my $h1 = Gtk2::Gdk::Atom->intern("hello");
my $h2 = Gtk2::Gdk::Atom->intern("hello");
if ($h1 == $h2) {
print "equal\n";
} else {
print "unequal\n";
}
if ($h1 != $h2) {
print "unequal\n";
} else {
print "equal\n";
}
exit 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]