Advertisement
apfel2kuchen

Durchhangeln - Baum - Letzer von Links

Nov 21st, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. type
  2. tRefBinBaum = ^tBinBaum;
  3. tBinBaum = record
  4. info : integer;
  5. links : tRefBinBaum;
  6. rechts : tRefBinBaum
  7. end;
  8.  
  9.  
  10. function sucheBlatt (inRefWurzel : tRefBinBaum) : tRefBinBaum;
  11. var
  12. zeiger : tRefBinBaum;
  13.  
  14. begin
  15. Zeiger := inRefWurzel
  16. if inRefWurzel^.links <> NIL then
  17. begin
  18. zeiger = sucheBlatt (inRefwurzel^.links)
  19. end;
  20. else
  21. begin
  22. if inRefWurzel^.links = nil then
  23. Writeln ('Ende erreicht');
  24. end;
  25. sucheBlatt := Zeiger;
  26. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement