You can't. That's always been one of the biggest annoyances for a lot of people. You have to do it the way you described.
function X takes loc returns real
return GetLocationX(loc)
endfunction
function Y takes loc returns real
return GetLocationY(loc)
endfunction
Make a function of it perhaps?
Dono if that's what you're looking for, but it'd be the current simplies way I think.