external function interface

all external functions use the following C++ interface
	XPE::TOKEN  ext_func( XPE::SREF xpe_this,
			      int cnt,
			      XPE::TOKEN arr[] )
They return an object of type XPE::TOKEN (if they do not return a value they must return tok_void) and they receive 3 parameters
  1. XPE::SREF   xpe_this
    this is the context of the function call (the object to which the function is being applied). If the actuall function call is a simple function call then this will be an empty context. If the actuall function call is a complex function call i.e. a function is being applied to an object, then the context will be the object to which the function is being applied.

  3. int   cnt
    this is the actual number of parameters supplied

  5. XPE::TOKEN   arr[]
    this is the actual list of parameters supplied
This is an example showing the XPE side of an external function call and the corressponding C++ side of the same external function call.

external function access to:

function context (applying an external method to an XPE object)
creating and returning an object from an external method

describe executing and XPE function from within externally compiled C code

XPE access methods