Function _conGetNL() Foundation
Return the value of a numeric container as an integer.
XPPAPIRET _conGetNL(ContainerHandle chn, LONG *nlValue);
The return value is NULL if the operation was successful. The function returns an error code (XPP_ERR_...) when the container chn is not of numeric type or the numeric value can not be represented as LONG.
_conGetNL() is used like _conGetND to read a numeric value of a container. The buffer is of the LONG type. When the numeric value has decimal places they are truncated.
The numeric type in Xbase++ can contain values that can not be represented in a LONG. If this occurs, an error is returned and the buffer is not changed. In this case, _conGetND() can be used to determine the value.
/*
Determines the numeric value of a container as LONG.
*/
#include <xppcon.h>
ContainerHandle hNumeric;
XPPAPIRET xr;
LONG nlValue;
xr = _conGetNL(hNumeric, &nlValue);
if (xr == 0)
{
/* ... Operations with the LONG value */
}
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.