See the following configuration:

Using ConTEXT as text editor and FreePascal as compiler we have a cool "IDE"! :D

We configured compiling source code by F9 and executing by F10. I wrote a related blog here (in Vietnamese).
int func () {
return {values-here};
}
Objects Pascal (such as Free Pascal, Virtual Pascal) using variable result to retrieve the values of function. By using {$X+} directive:
{$X+}
function func: integer;
begin
result:= {values-here};
end;
Return statement isn't a good coding practice. Using return statement could cause multiple ret instruction to be issued and it causes bigger code.