This is the simple version of C++ source code for the the external function own_func_fred

// simple function with no error checks

XPE::TOKEN own_func_fred( XPE::SREF xpe_this, int cnt, XPE::TOKEN arr[] )
{
	int	arg1, arg2;

	char	buff[32];


	arg1 = arr[0].get_int();

	arg2 = arr[1].get_int();

	sprintf(buff, "xxx_%d_%d", arg1, arg2);

	return buff;
}
A more robust version of own_func_fred with error checks.

An example showing the XPE side of the external function call