CONST has always tried to guess as to what type of variable to assign a value to. Back before I first overhauled CONST to allow us to use more functions with it with the internal math evaluator, it used to shoot for unsigned values by default.
Try a copy of QB64 around v0.90 or so, and you'll see that &HFFFFFFFF evaluated to -1.
When I overhauled the CONST system to add in our math functions and all, I made a point of trying to switch out to unsigned values, if possible. &HFFFFFFFF would now become +4286...(whatever).
Under the hood, both these values are the
exact same. One is FFFFFFFF as a signed long, the other is FFFFFFFF as an unsigned long. The main reason why I chose to swap from signed to unsigned by default, when I overhauled the CONST system the first time, was for numeric matches with POINT.
Now, sometime after the 1.2 and before the 2.1 version which is the most current, I went in and tweaked the CONST system once again. Before, it ran into issues with explicitly defined types and sometimes ignored them, so I expanded and corrected that issue (along with a few more little things like multiple assignments from the same line). Since users could now manually define what types they wanted associated with CONST, there wasn't any reason for me to hijack the process and force CONST to choose unsigned values over signed values. I took that hijack hack out for us as it was no longer necessary.
If one wants to work with unsigned values, simply make certain to assign unsigned values to your const, or else specify the const as being unsigned.
-8091512 4286875784 4286875784
C is an signed long.
C1~& is an unsigned long.
C2 is an unsigned long.
Either specify the CONST with an explicit type, or assign the value with the explicit type, and it makes certain that the value is that specific type. It's only when you leave off an explicit type completely that CONST chooses for itself as to what type of variable works best to store the value for you -- which in the above case happens to be a signed long.