Function _conGetNDF() Foundation
Reads the value and the default format of a numeric container.
XPPAPIRET _conGetNDF(ContainerHandle chn, double *ndValue
LONG *intDigits, LONG *decDigits);
The function returns an error code (XPP_ERR_...) when the container chn is not of numeric type. If the return value is NULL the operation was successful.
The function _conGetNDF() returns the value of a container of numeric type, along with information about the desired formatting for output of this value. The returned number of places before and after the decimal point give no information about the actual values before and after the decimal point.
/*
Determines the value and the format of a numeric container.
*/
#include <xppcon.h>
#include <stdio.h>
ContainerHandle chNumeric;
LONG nIntgDigits, nDecDigits;
XPPAPIRET xr;
double ndValue;
/* Assigns a value to ... hNumeric */
xr = _conGetNDF(hNumeric, &ndValue, &nIntgDigits, &nDecDigits);
if (xr == 0)
{
/* Output of the value of the number in the default format: */
printf(buffer,"%*.*f\n", nIntgDigits, nDecDigits, ndValue);
}
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.