2.2.4.28.38 MatrixObject::SetDigits

Description

Sets the number of digits of a particular digit mode of the matrix.

Syntax

BOOL SetDigits( int nDigits )

Parameters

nDigits
[input] Number of digits

Return

TRUE if successful; FALSE otherwise

Examples

EX1

// Matrix must exist in the project
void MatrixObject_SetDigits_Ex1()
{
    MatrixPage mp = Project.MatrixPages(0);
    if(!mp)
        return;
    
    MatrixObject moMy(mp.GetName(), 0);
    if (moMy.SetDigitMode(2)) // 2 -> significant digits
        out_str("Digit mode is set successfully!");
    else
        out_str("Digit mode is not set successfully!");
    moMy.SetDigits(4);
    printf("the number of significant digits are %d", moMy.GetDigits());  
}

Remark

See Also

MatrixObject::GetDigitMode, MatrixObject::SetDigitMode, MatrixObject::GetDigits

Header to Include

origin.h