function myFunction takes paramArgs returns value
//function contents
endfunction
//for example
function myFunction takes integer i, unit u returns real
return GetWidgetLife(u) + i
endfunction
//somewhere else
local real r = myFunction(5,GetTriggerUnit())
//or just, if you don't need the return
call myFunction(5,GetTriggerUnit())