VectorInt::SetVal Method

Overload List

#SignatureDescription
1TMtxVecInt *SetVal(const int Value) const;Set calling object element Index to Value.
2TMtxVecInt *SetVal(const int Value, const int Index, const int Len) const;Set all calling object elements [Index]..[Index+Len-1] to Value.

Overload 1: TMtxVecInt *SetVal(const int Value) const;

Set calling object element Index to Value.

#NameTypeDescription
1Valueconst int
Remarks:

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

Examples
#include "MtxExprInt.h"
#include "Units.MtxExprInt.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxExprInt;

void Example()
{
    VectorInt a;

    a = {1, 2, 3, 4};
    a.SetVal(5, 2, 2); // a = [1,1,5,5]
}
Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler

Overload 2: TMtxVecInt *SetVal(const int Value, const int Index, const int Len) const;

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

#NameTypeDescription
1Valueconst int
2Indexconst int
3Lenconst int
Remarks:

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

Examples
#include "Units.MtxVecInt.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;

void Example()
{
    TVecInt* a;
    CreateIt(a);
    a->SetIt(DewArray<int>{1,2,3,4} );
    a->SetVal(5,2,2);  // a = [1,1,5,5]
    FreeIt(a);
}
Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler