Function _conPutNL() Foundation

Assigns a long integer to a container or produces a new numeric container.

Syntax
ContainerHandle _conPutNL(ContainerHandle ch, LONG nlValue);
Parameters
ContainerHandle ch
Handle of any container or NULLCONTAINER.
LONG nlValue
New long integer value of the container.
Return

Returns either the passed container handle or the container handle of the newly created container. The return value is NULLCONTAINER if an error occurs.

Description

_conPutND() is used to assign a numeric value to a container. 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.

Examples
/* 
Returns an integer value as the return value to Xbase++. 
*/ 
#include <xppcon.h> 

ContainerHandle  hNumeric; 
LONG             nlValue; 


/* ... Calculates nlValue */ 

hNumeric = _conPutNL(NULLCONTAINER, nlValue); 
if (hNumeric != NULLCONTAINER) 
{ 
_conReturn(<pList>, hNumeric); 
_conRelease(hNumeric); 
} 
else 
{ 
/* error occurred: return NIL. */ 
_conReturn(<pList>, NULLCONTAINER); 
} 

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.