12-29-2023, 05:41 PM
(12-29-2023, 05:33 PM)Kernelpanic Wrote: So, I don't really understand it anymore.
Code: (Select All)
'Const-Problem. https://qb64phoenix.com/forum/showthread...0#pid22330
'29. Dez. 2023
Const foo = 1
Print foo
Const foo1 = &HFFFF
Print foo1
Const foo2 = &HFFFF + &HFFFFFFFF
Print foo2
'Addition von Pluswerten, sonst Minuswert
Const foo3 = &HFF000000~& + &HFFFF~&
Print foo3
'4278255615 + (-65535) = 4.278.190.080
Const foo4 = &HFF000000~& + &HFFFF
Print foo4
'Minuswert
Const foo5 = &HFF000000 + &HFFFF
Print foo5
Print &HFF00FFFF
Print &HFEFFFFFF
You're still using the currently bugged version.
Quote:At the moment, there are instances where CONST will *negate* the resulting value for us. Const foo = 1 will assign a value of -1 to foo... This is a 100% glitch and is being patched even now by the dev team. (It's not something so obvious as to work with 1, but the previous was just an illustration. Where you can find the glitch is with CONST foo = &HFFFF which returns a value of - &HFFF.)
You're not going to see the changes yet, as they're still in the update queue and not live in the language yet. I was just giving folks early warning of *upcoming changes*, in the next release.