Can you change a variables pointer?

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

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You can cludge a static bank onto a variable

Local a:Int=5
Local bnk:TBank=CreateStaticBank(VarPtr(a),4)
Local buf:Int Ptr=Int Ptr(BankBuf(bnk))
buf[0]=10 'same as a=10
print buf[0] 'same as print a