0

http://news.cnet.com/8301-1023_3-57569533-93/adobe-releases-source-code-for-1990-version-of-photoshop/

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;
4

1 回答 1

2

Cnet 文章链接到计算机历史博物馆的一篇博客文章,该文章宣布了代码的发布,它告诉你答案:

按行数计算,大约 75% 的代码使用 Pascal,大约 15% 使用 68000 种汇编语言,其余的是各种数据。

问题中引用的特定代码确实是 Pascal。

于 2013-02-15T22:19:26.160 回答