DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


CloneArray

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

Hint: Note that the property NumEntries returns the top of the stack. Thus in order to retrieve the last array which was pushed to the stack without changing the stack pointer can be achieved by CloneArray[NumEntries, Arr].