TYPE nodeptr =^ nodetype
nodetype = RECORD
data : integer
END;
VAR head : nodeptr
PROCEDURE sort_output_delete (head : nodeptr);
VAR p
BEGIN WHILE head <> NIL DO
BEGIN p:= NIL
WHILE s <> NIL DO
BEGIN IF s^
r:= s
END
write(q^
IF p=NIL THEN (
dispose (q)
END
writeln
END
TYPE
link=^node
node=RECORD
key:char; freq:integer; pre
END;
VAR l:link;
FUNCTION loc(l:link;x:char):link;
VAR p
BEGIN
p:=l^
WHILE p^
IF p=l THEN [ new(q); q^
ELSE {找到}
[ p^
WHILE q^
IF p<>q THEN [ (
]
IF (
return(q);
END;【北京工業大學
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/22554.html