Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
20. Apr 2006
ok but ist the same also when i put
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;
Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
20. Apr 2006
yes your code is great xaromz, thats what i wanted
but i initialized the value of result, thnaks the init boolean (by the first run, the value of result was set to current), so it wasnt undefined, iam not getting it :(
Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
20. Apr 2006
iam sorry iam not getting it " Line 17: there is an "exit" missing -_- " Can you explain?
Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
20. Apr 2006
thats insane, try to run this...you will get the most highest parent (node 0) as result, but try to run it with ShowMessage('val '+ValToStr+' res'+inttostr(result)); and you will get the right result...also you get the right result by adding result:=result;
but WHY?????????????????????????????????????
OMG WHY???????????????????
type TBinTree=class
Value:integer;
Left,Right:...