>>> in 8.4, expr 38016 << 16 returns -1803550720. In 8.5, the same
>>> expression returns 2491416576. Is there a way to get the negative
>>> value in 8.5?
Here's one portable answer:
% proc 32bit {val} {
binary scan [binary format i $val] i result
return $result
}
% 32bit [expr {38016 << 16}]
-1803550720