As you might have noticed, -2147483648 = -231 is the negative limit of the signed 32-bit integer range.
When I try to use this value literally...:
set /A -2147483648
..., the following error occurs:
Invalid number. Numbers are limited to 32-bits of precision.
However, I can state the positive limit 2147483647 = 231 - 1 without any trouble:
set /A 2147483647
So why does set /A
behave like that, although the number is perfectly within the applicable range for signed two's complement 32-bit integers?
And is there a way to state the constant -2147483648 directly in a set /A
expression?
I know, I could use a variable that is preset to the value, like set NEGLIM=-2147483648
, and then use it in an unexpanded way, like set /A NEGLIM
, but is there not an immediate way of providing that value?