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


Unit: SDL_vector
Class: TVector, TIntVector
Declaration: procedure Assign(Source: TPersistent);

The Assign method assigns one vector to another. The following properties/parameters are copied from the source component:
  • NrOfElems
  • IsEmpty
  • the data
  • the events

Hint 1: In general, the statement Destination := Source; is not the same as the statement Destination.Assign(Source);. The first statement makes Destination refer to the same object as Source, whereas the second statement copies the contents of the object referenced by Source into the object referenced by Destination.

Hint 2: The Clone method is comparable to the Assign method. However cloning a data vector copies only the data (no auxiliary information) and triggers the OnChange event, while Assign does not.

Last Update: 2020-Aug-04