{    7
   3   20
 1  5
  2

suchbaum pre: 7,3,1,2,     5,20
              W Lteilbaum  R
}

uses Crt,stack;

type ref = ^baum;
       baum = record
       value: char;
       left, right: ref;
end;

procedure Pop(var s: stack; c: char);
begin

end;

{Ausdrucksbaum, Zahlen sind BlĄtter und Operatoren sind Knoten}
procedure a_baum(var s: stack; var b: ref);
var c: char;
begin
 if is_Empty(s) then b:=nil
 else begin
 pop(s,c);
   new(b);
   b^.value:=c;
 if c in ['+','*','/','-'] then begin
 a_baum(b^.right,c);
 a_baum(b^.left,c); end
 else begin
 b^.left:=nil;
 b^.right:=nil; end;
 end;
end;
end;