I'd just make TEST an unsigned byte because when you are doing the case, &HFF is going to be pointing to 255 while your variable will be overflowed and not match the value. That's my guess
Yeah, I mean that is what I ended up doing. QB64 defaults to LONG with undefined variables and constants or SINGLEs? so &HFF is probably being treated as a LONG or SINGLE even though the comparison variable is BYTE. I'd almost think it would want to match the CASE type with the SELECT type.
In terms of BITs they are identical,at BYTE width, &HFF = 11111111, -1=11111111, and 255=11111111. So in a bit-wise comparison they should always be =.
Been doing a lot of BIT work in my game lately, so probably why I was taken aback by this.
Assign the variable type to your &H-math manually, like I've done above, and QB64 won't have to guess at what that value is supposed to be.
Oh yeah, I forgot about that. Been a long time since I have used that method.
✅Thanks for the feedback guys.✅