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



ReadBinary


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

The method ReadBinary reads all data of the file FName without actually loading it into memory. Instead it triggers the OnReadElement event for each read data value. The matrix file is read starting with the time slot TSlotStart up to TSlotEnd.

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 function returns the following error codes:

 0 ... everything is OK
-1 ... TSlotStart is beyond the maximum time slot

Hint: In addition to the OnReadElement event the method ReadBinary triggers the OnPercentDone event as well (to allow you to implement a progress indicator when working with large files).



Last Update: 2023-Feb-06