fnCalculate


Prototype

const char* __cdecl fnCalculate ( void );

Return value

A fully descriptional message of the result as a const char*.

Parameters

None

Remarks

This functions main responsibility is to format a message describing what was done and what the result is. It may also be used to perform the actual calculation if this was impossible to do in fnPushValue.

Example

const char* __cdecl fnCalculate ( void )
{
    if (_pushedValues > 0)
    {
        double dMeanLength = _characterCount / _pushedValues;

        static char szBuf[512];
        ::sprintf(szBuf,
                  "Average character count was %lf characters.",
                  dMeanLength;

        return szBuf;
    }

    return "No calculation performed.\nNo data was available.";
}

See Also

Statistical API, fnPushValue