10-21-2022, 11:42 PM
I usually just create a integer or long variable that I generally name "togs". I assign certain bits of it to various effects, then just toggle the bits on and off with
SUB Toggle (var AS INTEGER)
togs = _TOGGLEBIT(togs, var)
END SUB 'Toggle
Then I just test
IF togs AND bit#^2 THEN ... ELSE ... when I'm display processing.
I find it easy and fast enough for the stuff I do. I often just create constants for the bit numbers for more comment friendly code.
An intriguing idea that I'll have wrap my poor tender head around, but is there a _MEM type speed or optimization advantage to this?
Hell just reading the post learned me a new thing you can do with _OFFSET
SUB Toggle (var AS INTEGER)
togs = _TOGGLEBIT(togs, var)
END SUB 'Toggle
Then I just test
IF togs AND bit#^2 THEN ... ELSE ... when I'm display processing.
I find it easy and fast enough for the stuff I do. I often just create constants for the bit numbers for more comment friendly code.
An intriguing idea that I'll have wrap my poor tender head around, but is there a _MEM type speed or optimization advantage to this?
Hell just reading the post learned me a new thing you can do with _OFFSET
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
sha_na_na_na_na_na_na_na_na_na: