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

  1. % set i [expr 1]
  2. 1
  3. % tcl::unsupported::representation $i
  4. value is a int with a refcount of 2, object pointer at 0x7fd2c1809500, internal representation 0x1:0x0, string representation "1"
  5. % set s [string trim { 1 }]
  6. 1
  7. % tcl::unsupported::representation $s
  8. value is a pure string with a refcount of 2, object pointer at 0x7fd2c180e840, string representation "1"
  9. % puts [db eval {select $i < $s}]
  10. 1
  11. % string is alnum $i
  12. 1
  13. % tcl::unsupported::representation $i
  14. value is a string with a refcount of 3, object pointer at 0x7fd2c1809500, internal representation 0x7fd2c1889dd0:0x0, string representation "1"
  15. % puts [db eval {select $i < $s}]
  16. 0
  17.  
  18.