在linux下fpc 1.0.10能否成功编译这个程序(pascal),有linux的朋友帮个忙,事情紧急.谢谢.
程序如下:
program equal;
const   inf='equal.in';
        ouf='equal.out';
var     n:integer;
        p,np:array[0..26] of string;
        answ:array[0..26,1..9] of Int64;
        ok:array[1..26] of boolean;
procedure reads;
var     i,j:integer;
        st,tmp:string;
begin
        assign(input,inf);
        reset(input);
                 readln(st);
                 tmp:='';
                 for j:=1 to length(st) do
                     begin
                        if st[j]<>' ' then
                           tmp:=tmp+st[j];
                     end;
                 np[0]:=tmp;
          readln(n);
          for i:=1 to n do
              begin
                 readln(st);
                 tmp:='';
                 for j:=1 to length(st) do
                     begin
                        if st[j]<>' ' then
                           tmp:=tmp+st[j];
                     end;
                np[i]:=tmp;
             end;
        close(input);
end;
procedure change(x:char);
var  i,j:integer;
begin
        p:=np;
          for i:=0 to n do
            for j:=1 to length(np[i]) do
              if p[i][j]='a' then p[i][j]:=x;
end;
function yx(x:char):integer;
begin
        case x of
          '+','-' : exit(1);
          '*'     : exit(2);
          '^'     : exit(3);
        end;
end;
function ans(x:string):Int64;
var     i,k,l,j:integer;
        lowch:char;
        low:integer;
        key:Int64;
        code:integer;
        s1,s2:string;
begin
        k:=0; l:=0;
        while (x[1]='(') and (l=0) do
          begin
          l:=1;
          for j:=1 to length(x)-1 do
                  begin
                        if x[j]='(' then inc(k);
                        if x[j]=')' then dec(k);
                        if k=0 then break;
                  end;
              if (k=1)and(j=length(x)-1) then
                 begin
                        x:=copy(x,2,length(x)-2);
                        l:=0; K:=0;
                 end;
          end;
       val(x,key,code);
       if code=0 then exit(key);
       lowch:='^'; low:=0; k:=0;
       for j:=1 to length(x) do
           begin
                if x[j]='(' then inc(k);
                if x[j]=')' then dec(k);
                if (k=0) and (yx(x[j])<=yx(lowch)) then
                   begin
                        lowch:=x[j];
                        low:=j;
                   end;
           end;
           s1:=copy(x,1,low-1);
           s2:=copy(x,low+1,length(x));       case lowch of
         '+' : exit(ans(s1)+ans(s2));
         '-' : exit(ans(s1)-ans(s2));
         '*' : exit(ans(s1)*ans(s2));
         '^' : exit(power(ans(s1),ans(s2)));
         end;
end;
procedure process;
var   c,i,j:integer;
begin
        for c:=1 to 9 do
          begin
                change(chr(48+c));
                for i:=0 to n do
                answ[i][c]:=ans(p[i]);
          end;
          fillchar(ok,sizeof(ok),true);
        for i:=1 to n do
            begin
                for j:=1 to 9 do
                    begin
                        if answ[i][j]<>answ[0][j] then
                           begin
                                ok[i]:=false;
                           end;
                    end;
            end;
        assign(output,ouf);
        rewrite(output);
        for i:=1 to n do
            if ok[i] then write(chr(64+i));
        close(output);
end;
begin
        reads;
        process;
end.