accessing members of the object to which the external method is being applied

XPE::TOKEN XPE_FRAME::calc_distance( XPE::SREF xpe_this, int cnt, XPE::TOKEN arr[] )
{
	int	x1, y1,
		x2, y2,
		dx, dy;

	long	dist;

	x1 = xpe_this.get_member("x1");
	y1 = xpe_this.get_member("y1");
	x2 = xpe_this.get_member("x2");
	y2 = xpe_this.get_member("y2");

	dx = x2 - x1;
	dy = y2 - y1;

	dist = int(sqrt((dx * dx) + (dy * dy)));

	return dist;
}