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: [1] procedure SaveToStream (var OutStream: TMemoryStream; LowElem, HighElem: integer);
[2] procedure SaveToStream (var OutStream: TFileStream; LowElem, HighElem: integer);

The procedure SaveToStream appends the values of the vector elements to the stream OutStream. Version [1] works with memory streams, version [2] with file streams. In version [1] OutStream may be set to nil in which case a new memory stream is created, in version [2] the file stream has to exist before calling SaveToStream. The parameters LowElem and HighElem define the range of the vector elements to be stored on the file.

Example: The statement Vec.SaveToStream (MyStream, 2,10 ); creates the stream MyStream (if MyStream is nil) and stores all elements from two to ten in the stream.

Hint 1: The internal formats of the streams created by TVector and TIntVector are different. Thus a TIntVector cannot load a vector stored my TVector and vice versa.

Hint 2: Setting both LowElem and HighElem) to zero values forces the method to use all elements of the vector.

Last Update: 2012-Oct-20