In an assignment, how can I distinguish between assigning the return value of a function that takes no parameters (and therefore the call may have no parens), and assigning the function reference itself. Is it only by looking at the type of the receiving variable?
Here is a code fragment for illustration (Delphi noob here):
type
TIntFun = function():integer;
var
IntFun : TIntFun;
I : integer;
function AnIntFun(): integer;
begin
result := 3;
end;
begin
I := AnIntFun; // argumentless call, returning 3
IntFun := AnIntFun; // function assignment?
end