Function _conPutNDF() Foundation
Assigns a floating point number with a predefined format to a container or produces a new numeric container.
ContainerHandle _conPutNDF(ContainerHandle ch, double nfValue
LONG intDigits, LONG decDigits);
Returns either the passed container handle or the container handle of the newly created container. The return value is NULLCONTAINER if an error occurs.
_conPutNDF() is used to assign a numeric value with a predefined output format to a container. This function is needed with databases which define a specified format for numeric values. When the passed container handle has the value NULLCONTAINER, a new numeric container is created. Otherwise the value of the passed container is changed.
When a new container is created, it must be released with _conRelease() as soon as it is no longer needed.
/*
Returns a floating point number with a specified number of places to
the right of the decimal point as a return value to Xbase++.
*/
#include <xppcon.h>
ContainerHandle hNumeric;
double nfValue;
LONG nDecDigits;
/* ... Calculates nfValue and nDecDigits */
hNumeric = _conPutNDF(NULLCONTAINER, nfValue, -1, nDecDigits);
if (hNumeric != NULLCONTAINER)
{
_conReturn(<pList>, hNumeric);
_conRelease(hNumeric);
}
else
{
/* Error occurred: return NIL. */
_conReturn(<pList>, NULLCONTAINER);
}
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.