Function _conGetNL() Foundation

Return the value of a numeric container as an integer.

Syntax
XPPAPIRET _conGetNL(ContainerHandle chn, LONG *nlValue);
Parameters
ContainerHandle chn
Handle of a container with numeric value.
LONG *nlValue
Pointer to a buffer of LONG type into which the value of the numeric container is written.
Return

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.

Description

_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.

Examples
/* 
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 */ 
} 

Feedback

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.