Pointers

BlitzMax Forums/BlitzMax Programming/Pointers

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.

The reason you can't have a pointer to a Blitzmax type is because Blitzmax types are already "by reference."

So, if you want p to be a pointer to t, you can do the following
global t:test = new test
global p:test = t  '<---p now points to the same object as t


Any changes made to p are of course reflected in t, and the opposite is true as well.