Address storage

BlitzMax Forums/BlitzMax Programming/Address storage

Drey(Posted 2006) [#1]
basically what am i missing to get something like this to work.


Local Y
Local intYAddress[1]
Local Yp:Int Ptr 

Y = 2
intYAddress[0] = Int(Varptr(Y))


yp = intYAddress[0]

yp[0] = 3

Print Y



i want to get the address of a variable. Store it in a int array. Have the address put into a pointer. Then manipulate the value.


Yan(Posted 2006) [#2]
I think this should work...

Local Y
Local intYAddress[1]
Local Yp:Int Ptr 

Y = 2
intYAddress[0] = Int(Varptr(Y))


Yp = Int Ptr(intYAddress[0])

Yp[0] = 3

Print Y