Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

IFR_Retcode IFRUtil_VDNNumber::numberToDouble ( unsigned char *  number,
double &  result,
int  iolength = 21 
) [static]

Convert a VDN number into a double floating point number.

Parameters:
number the source VDN number.
result the destination integer number.
iolength the iolength of the VDN number. This is (number of digits + 1 / 2) + 2 (Same as short field info iolength, including the defined byte).
Returns:
IFR_OK went ok, IFR_NOT_OK if the VDN number is illegal.

Definition at line 520 of file IFRUtil_VDNNumber.cpp.

References IFR_NOT_OK, IFR_OK, and IFR_OVERFLOW.

{
    char res;
    s40glrel((const char *)number, 1, len, &result, &res);
    switch(res) {
    case (num_ok):
    case (num_trunc):
        return IFR_OK;
    case (num_overflow):
        return IFR_OVERFLOW;
    default:
        return IFR_NOT_OK;
    }
}


Generated by  Doxygen 1.6.0   Back to index