Posted to tcl by mr_calvin at Tue Jul 31 08:46:35 GMT 2018view pretty

% set i [expr 1]
1
% tcl::unsupported::representation $i
value is a int with a refcount of 2, object pointer at 0x7fd2c1809500, internal representation 0x1:0x0, string representation "1"
% set s [string trim { 1 }]
1
% tcl::unsupported::representation $s
value is a pure string with a refcount of 2, object pointer at 0x7fd2c180e840, string representation "1"
% puts [db eval {select $i < $s}]
1
% string is alnum $i
1
% tcl::unsupported::representation $i
value is a string with a refcount of 3, object pointer at 0x7fd2c1809500, internal representation 0x7fd2c1889dd0:0x0, string representation "1"
% puts [db eval {select $i < $s}]
0