All types except integer, real, boolean, string and code are handles.
For example:
local unit u = GetTriggerUnit()
local handle h = u // Legal: All units are handles
set u = h // Illegal: Not all handles are units
The advantage of handles is that any object can be referenced assigned to a handle.
It can be inverted with a function like this:
function HandleToUnit
takes handle h
returns unit return h
return nullendfunctionfunction HandleToInt
takes handle h
returns integer return h
return 0
endfunction The HandleToInt function is great because you can get a unique integer representation for any object that way.