Custom Type Object reference inside Function

BlitzMax Forums/BlitzMax Programming/Custom Type Object reference inside Function

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.

objects are allways by reference.

That's not true
Actually it is. I'll be a bit nit picky here, but when you use "Var" on an object parameter, what happens is that the *reference* to the object is passed by...reference (!).
So in your example the call to ChangeList indeed modifies "lista" (which is just a reference), but the object it initally pointed to (the TList instance created on the first line) is kept unchanged.