ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1100. Final Standings

Why COMPILATION ERROR!!!!!!!!!!!!!!!!!!!!!!!!!
Posted by Darth Niculus(Ivan Nicolae) 4 Aug 2004 20:01
     I have a Pascal program. My computer compiles it perfect. I tried in to compile it in Free Pascal and Borland Pascal. It works. Why do I get compilation error?
Re: Why COMPILATION ERROR!!!!!!!!!!!!!!!!!!!!!!!!!
Posted by Macarie programatorul in actiune 4 Aug 2004 20:07
the judge compiles it with Delphi...
Maybe you used a reserved word as variable...
check a list of them in delphi on a previous post...
Jury uses Free Pascal. Post your code here (-)
Posted by Dmitry 'Diman_YES' Kovalioff 4 Aug 2004 21:23
Just check your e-mail! (+)
Posted by Vladimir Yakovlev (USU) 4 Aug 2004 22:38
Select "Reply to this/my E-Mail address" when you submit your code and check e-mail later. In the case of Compilation Error you recieve the list of errors.
Re: Just check your e-mail! (+)
Posted by Darth Niculus(Ivan Nicolae) 6 Aug 2004 20:37
    I tried to compile it in Delphi and it works. I tried to compile it in Free Pascal and it works. What is the problem? I used Quick Sort.
    Here is my sorce:
    I hope you will find the problem.
   type vec=array[1..150000] of longint;
var i,n,k:longint;
    a:vec;
    b:vec;

procedure poz(li,ls:longint);
var i,j,c,i1,j1,as:longint;
begin
     i1:=0;
     j1:=-1;
     i:=li;
     j:=ls;
     while i<j do
          begin
               if a[i]<a[j] then
                 begin
                      c:=a[j];
                      a[j]:=a[i];
                      a[i]:=c;
                      as:=b[j];
                      b[j]:=b[i];
                      b[i]:=as;
                      c:=i1;
                      i1:=-j1;
                      j1:=-c;
                  end;
               i:=i+i1;
               j:=j+j1;
           end;
     k:=i;
end;

procedure quick(li,ls:longint);
begin
     if li<ls then
       begin
            poz(li,ls);
            quick(li,k-1);
            quick(k+1,ls);
        end;
end;

begin
     readln(n);
     for i:=1 to n do readln(b[i],a[i]);
     quick(1,n);
     for i:=1 to n do writeln(b[i],' ',a[i]);
end.
See in
Posted by Vladimir Yakovlev (USU) 7 Aug 2004 01:06
Do you get that message in e-mail?

test.pas(7,17) Fatal: Syntax error, identifier expected but as found

It means that as is a reserved word.
Re: See in
Posted by Shogal [Kaliningrad] 10 Sep 2004 00:36
'as' is really reserved word so you have to rename it

Edited by author 10.09.2004 00:37