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



LoadBinaryArray


Unit:SDL_openarrays
Class: none
Declaration: [1] function LoadBinaryArray (FName: string; var Arr: TInt2DArray; var DataID: string; CheckFormat: boolean): integer;
[2] function LoadBinaryArray (FName: string; var Arr: TDouble2DArray; var DataID: string; CheckFormat: boolean): integer;
[3] function LoadBinaryArray (FName: string; var Arr: TDouble3DArray; var DataID: string; CheckFormat: boolean): integer;
[4] function LoadBinaryArray (FName: string; var Arr: TDouble4DArray; var DataID: string; CheckFormat: boolean): integer;

The function LoadBinaryArray loads the data of an array previously stored by the function SaveBinaryArray into the array Arr. The parameter FName specifies the filename of the stored array, the variable parameter DataID returns any single-line user-defined data identifier. Setting the parameter CheckFormat to TRUE forces a check of the numeric format on file, setting it to FALSE reads the data from the file even if the format is wrong. The CheckFormat parameter should always be set to TRUE, except when reading a file containing the old binary format (which did not contain any information on the numeric format).

The function returns the following error codes:

 0 ... everything is OK
-1 ... cannot read file FName (missing or invalid format)

Hint: The binary data format used by this routine is compatible with the binary data format used by TMatrix.SaveBinary.



Last Update: 2023-Feb-06