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


Class:TVector, TIntVector
Declaration:function LoadFromFile (FileName: string; AdjustVectorSize: boolean): boolean;

The function LoadFromFile loads the vector elements which have been stored previously by the method StoreOnFile. The parameter FileName specifies the name of the data file. LoadFromFile returns a TRUE value, if the data has been successfully read from the disk. If the parameter AdjustVectorSize is set to TRUE, the vector size is adjusted to hold the entire data on the file. If AdjustVectorSize is FALSE the data will be only read if it fits into the existing vector.

Hint 1: If the data on file consists of floating point numbers the values are automatically rounded to their nearest integers if LoadFromFile is a member of TIntVector.

Hint 2: The function LoadFromFile can be used to read any external data into a vetcor. The only prerequisite is to use the correct format of the data file. The numbers should be stored as ASCII-strings of any format and have to be separated by at least one blank (ASCII 32).

Last Update: 2012-Oct-20