Function _conCompare() Foundation
Compares two containers.
XPPAPIRET _conCompare(LONG *cmp,
ContainerHandle ch1, ContainerHandle ch2);
Returns an error code (XPP_ERR_...) if the containers are not of the same type.
Using this function the comparison operators (<, <=, >=, >) of the Xbase++ language level become accessible to the C programmer. The comparison incorporates the current values of SET EXACT and SET LEXICAL.
/*
Comparison of two string containers
*/
#include <xppcon.h>
XPPAPIRET xr;
ContainerHandle chs1, chs2;
LONG cmp;
/*
Generate and initialize string containers ...
*/
xr = _conCompare( &cmp, chs1, chs2 );
if (xr == 0)
{
if (cmp < 0)
/* chs1 less than chs2 ... */
else if (cmp > 0)
/* chs1 greater than chs2 ... */
else
/* chs1 equal to chs2 ... */
}
/*
Release of the string container ...
*/
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.