curvebase::SetUpperBound

Description

Set the upper display index of the Curve object.

Syntax

BOOL SetUpperBound( int nUpper )

Parameters

nUpper
[input] New upper display index of the Curve object.

Return

Returns TRUE on successful exit and FALSE on failure.

Examples

EX1

int curvebase_SetUpperBound_ex1(string dsName = "Book1_A")
{
        Curve    crv(dsName);
    crv.SetSize(10);
    for(int ii = 0; ii < 10; ii++)
        crv[ii] = ii;
    
    crv.SetLowerBound(2);
    crv.SetUpperBound(7);
    BasicStats bsStatVal;
    Data_sum(&crv, &bsStatVal);
    out_int("LowerBound is ",bsStatVal.min );
    out_int("UpperBound is ",bsStatVal.max );
}

Remark

Set the upper display index of the Dataset range. Index values are 0 based offsets so use SetUpperBound(-1) to display no rows. SetUpperBound is supported only for Datasets (not vectors) while GetUpperBound is supported for all vectorbase derived objects. This allows for creation of more general purpose functions that can take vectorbase objects as arguments in place of Dataset objects. Essentially, the upper bound can be read but not written for vectors. SetUpperIndex is a synonym for SetUpperBound.

See Also

vectorbase::GetUpperBound, vectorbase::GetSize, vectorbase::SetSize, vectorbase::GetLowerBound, Dataset::SetLowerBound

header to Include

origin.h