Hello,
one problem (but not the only one I guess) with your code is that you haven't set the Result prior to comparing it to "Value". So "Result" is undefined.
I think you were trying to do something like this:
Delphi-Quellcode:
function TBinTree.FindMin: Integer;
begin
Result := Value; // Assume current Value is lowest
if Assigned(Left) then
Result := Min(Left.FindMin, Result); // Get lowest value [current, left]
if Assigned(Right) then
Result := Min(Right.FindMin, Result); // Get lowest value [current, right]
end;
xaromz