TAbstractMtxVecInt.SetVal Method

function SetVal(Value: integer): TMtxVecInt; overload;

Set all calling object elements to Value.

#NameTypeDescription
1Valueinteger

Result: stored in self (calling object), returns self for chaining

Indexed: function SetVal(Value, Index, Len: integer): TMtxVecInt; overload;

Set all calling object elements [Index]..[Index+Len-1] to Value.

#NameTypeDescription
1Valueinteger
2Indexintegerstart index
3Lenintegerelement count

Result: stored in self (calling object), returns self for chaining

Remarks:

An exception is raised if array borders are overrun/underrun.

Examples
Uses MtxExprInt;

procedure Example;
var a:MatrixInt;
begin
    a := [[1,2],[3,4]];
    a.SetVal(5,2,2); // a = [1,1,5,5]
end;