Can you change a variables pointer?

BlitzMax Forums/BlitzMax Programming/Can you change a variables pointer?

Yeah. You'd need to use some pointer variables alongside them though. Or put them in a type.

local a=10
local b=25

would need..

local c:Int Ptr=varptr(a)
local d:Int Ptr=varptr(b)

Then think of your variable with c[0] and d[0] instead of a and b

ie

c=d ' make a look at b
print c[0] ' same as print a
print d[0] ' same as print b
c[0]=5 ' same as a=5
d[0]=15 ' same as b=15