Referencing variables via pointers
#4
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
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply


Messages In This Thread
Referencing variables via pointers - by SMcNeill - 10-21-2022, 03:49 PM
RE: Referencing variables via pointers - by Pete - 10-21-2022, 03:58 PM
RE: Referencing variables via pointers - by OldMoses - 10-21-2022, 11:42 PM
RE: Referencing variables via pointers - by Pete - 10-22-2022, 01:25 AM
RE: Referencing variables via pointers - by Pete - 10-23-2022, 03:03 PM



Users browsing this thread: 8 Guest(s)