| |
copy, clone
Purpose:
Performs a deep copy of an object.
That means a new object is created and all fields are copied
into it. If a field itself contains an object this one
is recursively copied.
Return Values:
Returns an object which is the copy of the object.
Caution!
This function doesn't detect and
resolve cycles. Thus, the object passed to this function must have a tree-like structure.
|
Example:
input: | resulting output:
| <let x=splitstring("A,B,C");
>x=<? x;
y=x;
z=copy(x);
x[0]="D";x[1]="E";y[2]="F";
>x=<? x;
>y=<? y;
>z=<? z;
> | x=([0]="A", [1]="B", [2]="C")x=([0]="D", [1]="E", [2]="F")y=([0]="D", [1]="E", [2]="F")z=([0]="A", [1]="B", [2]="C") |
This page was dynamically generated by the
web application development tool RADpage
of H.E.I.
© 1996-2018 H.E.I. All Rights Reserved.
|