The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_matrix
Class: TMat4D
Declaration: function AppendToBinaryFile (FName: string; TSlotStart, TSlotEnd: integer): integer;

The method AppendToBinaryFile appends selected time slots between TSlotStart and TSlotEnd to the file FName. As a prerequisite, the number of columns, the number of rows, and the number of layers of both the matrix in memory and the matrix on file must be equal; otherwise an exception is raised.

If any of the time slot parameters are zero or negative, the entire data matrix is appended. If TSlotStart is within the data range but TSlotEnd is beyond the maximum time slot, only the available data are saved.

The function returns the following error codes:

 0 ... everything is OK
-1 ... TSlotStart is beyond the maximum time slot
-2 ... the dimensions of the matrix in the file and the dimensions of the current matrix do not match (NrOfColumns, NrOfRows and NrOfLayers must be the same)

Hint: The method AppendToBinaryFile triggers the OnPercentDone event to allow to implement a progress indicator when working with large files.

Last Update: 2023-Feb-06