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: procedure ReadBinary (FName: string; TSlotStart, TSlotEnd: 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 beyond the maximum time slot of the data file an exception is raised, if TSlotStart is within the data range but TSlotEnd is beyond the maximum time slot, only the available data are read.

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



Last Update: 2016-Jun-29