![]() |
![]() |
![]() |
![]() |
merge function
Synopsis
merge defines an object that has all of the subobjects of object1 combined with the subobjects of object2.... etc. This is not a static merge like the "+" operator but continues to get changes made to its object arguments.
If subobjects of the same name exist in more than one object argument, the merge object uses the subobject found in the first object in the argument list.
-> group a {
-> int sub1 = 10, sub2 = 20;
-> };
-> group b {
-> int sub2 = 30, sub3 = 40;
-> };
-> group &c => merge(a,b);
-> c {
-> $print sub1
int sub1 = 10;
-> $print sub2
int sub2 = 20;
-> $print sub3
int sub3 = 40
![]() |
![]() |
![]() |
![]() |