(12-27-2023, 01:19 PM)SMcNeill Wrote:
That's.... just a weee off.
It's implicit sign extension. If the highest bit in the hex variable is set, one should always EXPLICITLY tell the datatype by using type suffixes. The following works...
Code: (Select All)
CONST const_blue = &HFF0000FF&&
PRINT const_blue, HEX$(const_blue)
and this too...
Code: (Select All)
CONST const_blue = &HFF0000FF~&
PRINT const_blue, HEX$(const_blue)
by the way, 32-bit colors should be unsigned values anyways, it's explicitly mentiond in the wiki in several places regarding image/color usage. Wish people would just once look there befor complaining, its rather sucking to maintain the wiki and knowing nobody use it when needed.
GuiTools, Blankers & other Projects:
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23