Yeah in theory that is mostly correct, but putting the digital sign aside, DBPRO even thinks -2147483648 is not a valid integer when compiling bitwise calculations. Same error message for the following 32bit boolean calculation:
-2147483648 && -2147483648 outputs 0 when run, but throws up the compiler error. I am not sure why it doesn't run for you
PRINT -2147483648 && -2147483648
WAIT KEY
2147483647 && 2147483647 successfully compiles, but is not equal to 2^31.
Quote: "In each case, i.e. dword and integer, there are 2^32, i.e. 4,294,967,296, different values. There is no mystery that I can see."
2^32 is what I thought was valid before, but that is an invalid 32bit calculation;
consider that 2^0 = 1, which is the first bit, and there are 32 numbers between 0 and 31. 32 is the 33rd number counting from zero.
In another expression, if (2^32) was valid for 32 bit boolean calculations; then so would (2^31) OR (2^32), which would add up to 6442450944, which is out of range for a DWord the same way (2^7) OR (2^8), inturn 128 || 256 adds up to 384 which is out of range for a byte. If DBPRO supported signed bytes(-128 to 127), 2^7 would be -128.
This all can be confirmed using the Matrix1 64 bit calculation below which successfully performs an OR operation on the 32nd and 33rd bits.
print Bit Set Mask( Bit Set( 0, 31), Bit Set( 0, 32) )
` Write To Clipboard Str$( Bit Set Mask( Bit Set( 0, 31), Bit Set( 0, 32) ) )
Wait Key
I am sure the compiler has it all wrong; all by one unit.