Summary
Sets vector values.
Class
TVec
Declaration
Function SetIt(const A: array of TSample): TVec;
Description
Does not change the Lenght or
Complex properties of the calling vector, but it does check for array overrun. The elements of A array are copied to the calling vector, starting at index 0. If the calling vector is complex then real parts of complex numbers are on even (0,2,4..)and imaginary parts on odd indexes.(1,3,5,..)
Declaration
Function SetIt(AComplex: boolean; const A: array of TSample): TVec;
Description
SetIt makes the use of open array construction, to set the values of the calling vector. It gives you the possibility to pass large arrays of elements without having to declare constant arrays.
Sets the Lenght property of the calling vector to (High(A)+1) and the Complex property to AComplex. The elements of A array are copied to the calling vector. If AComplex is True then real parts of complex numbers are on even (0,2,4..)and imaginary parts on odd indexes.(1,3,5,..)
Example 1
var a: TVec;
begin
CreateIt(a);
try
a.SetIt(False,[1,2,3,4]); // a = [1,2,3,4]
finally
FreeIt(a);
end;
end;
| Copyright 2008 Dew Research |
http://www.dewresearch.com