Well, well, well... this is interesting.
I'm parsing strings that contain 32bit integer values, and ran into an interesting edge case. If I use STRTOINT on a string whose value is "2147483648", the output of STRTOINT is 2147483647. Which is the highest positive value that a signed 32bit number can achieve.
The issue here is that I'm receiving these strings over TCP/IP from a 64-bit system, and the 32bit integer value is a bitfield that I need to parse into individual Booleans, each one of which has a unique meaning. And I need to capture the 32nd bit individually (along with the 1st through 31st).
I've got a quick&dirty fix in mind, but anyone know offhand of a mathematically elegant solution for this?