Declaration:T2DArrayStack.PopToFile (FName: string): integer;
The method PopToFile retrieves the array pushed to the stack at last, stores it in the file FName and removes it from the stack.

The function returns the following error codes:

 0 ... everything is OK, the array has been retrieved
-1 ... the stack is empty
-2 ... the file cannot be written