XPE has the following builtin data type
int integer 32 bit 2's complement binary float real 32 bit ieee 754 single precision $ string NUL terminated 'C' string struct structure array array SREF structure reference AREF array reference GENERATOR generator context CTL_ID control structure reference OBJ_ID object 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 otherwiseuse invalidate(val) to invalidate a variable
is_struct(val) return TRUE if the value is a structure or reference to a structure,
return FALSE otherwiseBEWARE 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 otherwiseis_sref(val) return TRUE if the value is a reference to a structure
return FALSE otherwiseis_array(val) return TRUE if the value is an array or reference to an array,
return FALSE otherwiseBEWARE 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 otherwiseis_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.
- a value can consist of any of:
- array
- structure
- aref
- sref
- int
- float
- string
- generator
- ctl_id
- obj_id
- a variable consists of:
- a value
- a structure consists of one or more:
- variables
- an array consists of one or more:
- variables
- an array reference (AREF) consists of one or more:
- variables
- a structure reference (SREF) consists of one or more:
- variables
- a token consists of either
- a variable
- a value