I need a clarification of this case.
According my tests the Result variable is defined to: Boolean=False, Integer=0, String=\'\', Object=nil etc from the first line.
No, Result
has no (guaranteed) default value. It is undefined unless you give it a value. This is implied by the documentation, which states
If the function exits without assigning a value to Result or the function name, then the function's return value is undefined.
I just tried
function test: integer;
begin
ShowMessage(IntToStr(result));
end;
and got a message with the text 35531136
.