Declaration:T2DArrayStack.CloneArray (ix: integer; var Arr: TDouble2DArray): integer;
The function CloneArray retrieves the array stored on the stack at the index ix and copies it to the variable parameter Arr (the array Arr is automatically resized to fit the retrieved array). The parameter ix can assume values between 1 and NumEntries. The stack is not changed at all (in contrast to the Pop method).

Returned error codes:

 0 ... everything is OK
-1 ... the parameter ix is out of range