- 3


, . , . . . . , Nil. . , Nil. .

type

rec = record < > end; { }

ptree = ^tree; { }

tree = record { }

data: rec; { }

down: ptree { 1- }

right: ptree { }

end;

var root: ptree; { }

, . , .

procedure write_tree (f: tpf); {f - tpf = file

of rec}

var k: integer;

path: array [1..20] of tree;

begin

k := 1;

path [k] := root; { - }

while (k>0) and

(path[k]<>Nil) do

begin