现在我在看powerscript reference 中有一段英文不知如何理解,请帮我看看
When passing an object, you never get another copy of the object. By reference
and by value affect the object reference, not the object itself.
Objects passed by value
Here you pass a copy of the reference to the
object. That reference is still pointing to the original object. If you change
properties of the object, you are changing the original object. However, you can
change the value of the variable so that it points to another object without
affecting the original variable.
Objects passed by reference
Here you pass a pointer to the original
reference to the object. Again, if you change properties of the object, you are
changing the original object. You can change the value of the variable that was
passed, but the result is different—the original reference now points to the new
object.
Objects passed as read-only
Here you pass an object as read-only, and you
get a copy of the reference to the object. You cannot change the reference to
point to a new object (because read-only is equivalent to a CONSTANT
declaration), but you can change properties of the object.