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....



LoadBinary


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

The method LoadBinary loads all data from the file FName starting with the time slot TSlotStart up to TSlotEnd. The hypercube matrix is resized accordingly.

If any of the time slot parameters TSlotStart and TSlotEnd is zero or negative, the entire data file is read into the matrix. If TSlotStart is within the data range but TSlotEnd is beyond the maximum time slot, only the available data are read (the size of the matrix is reduced accordingly).

The function returns the following error codes:

 0 ... everything is OK
-1 ... unexpected type of variable
-2 ... binary matrix file is not 4D matrix
-3 ... not enough memory, matrix is too big
-4 ... TSlotStart is beyond the maximum time slot
-5 ... file FName does not exist
-6 ... file to big for 32-bit version

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



Last Update: 2023-Feb-06