Function _conPutND() Foundation

Assigns a floating point number to a container or produces a new numeric container.

Syntax
ContainerHandle _conPutND(ContainerHandle ch, double nfValue);
Parameters
ContainerHandle ch
Handle of any container or NULLCONTAINER.
double nfValue
New numeric value of the container.
Return

Returns either the passed or the new container handle. 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 a floating point number as a return value to Xbase++. 
*/ 
#include <xppcon.h> 

ContainerHandle  hNumeric; 
double           nfValue; 


/* Calculate ... nfValue  */ 

hNumeric = _conPutND(NULLCONTAINER, nfValue); 
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.