UncleRonin
Well-known member
I'm not sure if anyone has come across this before but I'm getting some very strange conversions between Booleans and Integers...
In all of my past projects where I've done conversion between these two data types an Integer with the value of 1 has always mapped to a Boolean with the value of True. And an Integer with the value of 0 has always mapped to a Boolean with the value of False. All of a sudden on two different PC's and all projects a Boolean with the value of True maps to an Integer with the value of -1 now!
In plenty of languages 0 is False and any other value is True but whereas True will always convert to 1 now it converts to -1 instead. Can anyone explain to me why this might happen?
In all of my past projects where I've done conversion between these two data types an Integer with the value of 1 has always mapped to a Boolean with the value of True. And an Integer with the value of 0 has always mapped to a Boolean with the value of False. All of a sudden on two different PC's and all projects a Boolean with the value of True maps to an Integer with the value of -1 now!
In plenty of languages 0 is False and any other value is True but whereas True will always convert to 1 now it converts to -1 instead. Can anyone explain to me why this might happen?