If one argument a number, and the other is a list, that still results
in numeric comparison:
% expr {0x1 == [list 1]} --> 1
% expr {0x1 == {1}} --> 1
One argument can be quoted, doesn't change this:
% expr {"0x1" == [list 1]} --> 1
% expr {"0x1" == {1}} --> 1
This is because, lists are also just strings (EIAS):
% expr {1 eq [list 1]} --> 1
% expr {1 eq {1}} --> 1
% expr {1 eq "1"} --> 1
If one argument has whitespace, that's still a numeric comparison:
% expr {0x1 == " 1 "} --> 1
% expr {0x1 == "\t1\n"} --> 1
Currently all the documentation on the behaviour of == in the manual:
"Valid for all operand types."
That's *all* the [expr] manual says about ==.
Regards,
Peter
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core