ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1100. Таблица результатов

Why COMPILATION ERROR!!!!!!!!!!!!!!!!!!!!!!!!!
Послано Darth Niculus(Ivan Nicolae) 4 авг 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!!!!!!!!!!!!!!!!!!!!!!!!!
Послано Macarie programatorul in actiune 4 авг 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 (-)
Послано Dmitry 'Diman_YES' Kovalioff 4 авг 2004 21:23
Just check your e-mail! (+)
Послано Vladimir Yakovlev (USU) 4 авг 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! (+)
Послано Darth Niculus(Ivan Nicolae) 6 авг 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
Послано Vladimir Yakovlev (USU) 7 авг 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
Послано Shogal [Kaliningrad] 10 сен 2004 00:36
'as' is really reserved word so you have to rename it

Edited by author 10.09.2004 00:37