Types

XPE has the following builtin data type
 
int integer32 bit 2's complement binary
floatreal32 bit ieee 754 single precision
$stringNUL terminated 'C' string
structstructure 
arrayarray 
SREFstructure reference 
AREFarray reference 
GENERATOR   generator context 
CTL_IDcontrol structure reference 
OBJ_IDobject structure reference 

values are automatically coerced between simple types if possible

Determining the type of a value

is_valid(val) return TRUE if the value is valid,
return FALSE otherwise

use invalidate(val) to invalidate a variable

is_struct(val) return TRUE if the value is a structure or reference to a structure,
return FALSE otherwise

BEWARE this will not differentiate between shared and non shared structures

is_struct(val)   &&   ! is_sref(val)   

return TRUE if the value is a structure,
return FALSE otherwise
is_sref(val) return TRUE if the value is a reference to a structure
return FALSE otherwise
is_array(val) return TRUE if the value is an array or reference to an array,
return FALSE otherwise

BEWARE this will not differentiate between shared and non shared arrays

is_array(val)   &&   ! is_aref(val)   

return TRUE if the value is an array,
return FALSE otherwise
is_aref(val) return TRUE if the value is a reference to an array
return FALSE otherwise

 

Type hierarchy

This diagram shows that: NOTE the recursive nature of the array and structure.