http://www.computerhistory.org/atchm/photoshop-license-agreement/
问题> 这是帕斯卡吗?
PROCEDURE AddCode (node: PNode; code: INTEGER; VAR word: Str255);
VAR
branch: INTEGER;
BEGIN
IF LENGTH (word) = 0 THEN
BEGIN
IF node^.leaf OR (node^.branch [0] <> NIL) OR
(node^.branch [1] <> NIL) THEN
BEGIN
WRITELN ('? Conflict for code ', code:1);
EXIT (PROGRAM)
END;
node^.leaf := TRUE;
node^.code := code
END
ELSE
BEGIN
IF word [1] = '0' THEN
branch := 0
ELSE IF word [1] = '1' THEN
branch := 1
ELSE
BEGIN
WRITELN ('? Invalid word for code ', code:1);
EXIT (PROGRAM)
END;
DELETE (word, 1, 1);
IF node^.branch [branch] = NIL THEN
BEGIN
NEW (node^.branch [branch]);
node^.branch [branch]^.leaf := FALSE;
node^.branch [branch]^.branch [0] := NIL;
node^.branch [branch]^.branch [1] := NIL
END;
AddCode (node^.branch [branch], code, word)
END
END;