The "ugly" way with records/functions is to use pointers as results.
EG:

function doit(const a: TMyRecord): PMyRecord;

I personaly use functions only where I do require if-ing the results, otherwise I use procedures packed with consts and vars(const is very smart when it comes to passing).