Einzelnen Beitrag anzeigen

Benutzerbild von sk.Silvia
sk.Silvia

Registriert seit: 8. Feb 2006
Ort: Slovenia
90 Beiträge
 
Delphi 7 Personal
 
#10

Re: Thats Insane - wrong memory setting by recursion???

  Alt 20. Apr 2006, 21:38
ok but ist the same also when i put

Delphi-Quellcode:
function TBinTree.FindMin(init:boolean):integer;
      begin
      if init then result:=self.Value;
      //ShowMessage('val '+ValToStr+' res'+inttostr(result));
      if value<result then
        begin
        result:=value;
        end;

      if not(left=nil) then result:=left.FindMin(false);
      if not(right=nil) then result:=right.FindMin(false);
      end;
value is always inicializes and result now too, but why the result changes besides on ShowMessage (again it gives the right value when i dont hide the showmessage dialog)
  Mit Zitat antworten Zitat