i think the real problem start with the = assignment, sometimes it make a copy and sometimes not.
this docu at ByVal is partly wrong.
When you pass parameters by value, it doesn't do this because in effect the parameter only represents a copy of the data itself.
objects are not copied or represent a value direct.
obj = no value (with the meaning of my data)
obj.Value = value (as integer) property
this should be named as ByRef = reference
By default, all arrays and objects are reference types that are passed ByVal
replaceing a ref parameter with a new object in the method is something what should be default.
i know the behaviour of xojo but for me it seems this get messed up and then the guide was written.