Passing structures

Structures as arguments behave like simple variables, not like objects.

Structures passed by value

When you pass a structure by value, PocketBuilder passes a copy of the structure. You can modify the copy without affecting the original.

Structures passed by reference

When you pass a structure by reference, PocketBuilder passes a reference to the structure. When you changes values in the structure, you are modifying the original. You will not get a null object reference, because structures always exist until they go out of scope.

Structures passed as read-only

When you pass a structure as read-only, PocketBuilder passes a copy of the structure. You cannot modify any members of the structure.