Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.08.01;
Скачать: CL | DM;

Вниз

Молю о помощи !!!   Найти похожие ветки 

 
banderas ©   (2004-07-17 08:07) [0]

У меня проблема с компиляцией моей проги
(до того как я начал подписывать коментарии все было ОК)

Я уже незнаю что делать

ЕСЛИ КТО ЗАИНТЕРИСОВАЛСЯ МОГУ КИНУТЬ НА МЫЛО ИСХОДНИКИ


 
Esu ©   (2004-07-17 08:09) [1]

Убери подписи ;)
А если серьезно то кидай, один фиг делать нечего. Фильм еще час качатся будет :(

esu@ua.fm, Delphi6


 
cyborg ©   (2004-07-17 08:48) [2]

Читай сообшения компилятора, там тебе пишет, а не Лумумбе из Зимбабуэ.


 
banderas ©   (2004-07-17 08:57) [3]

Да читал лажа какая то вот они:

[Error] Unit1.pas(263): ";" expected but "ELSE" found
[Error] Unit1.pas(266): Undeclared identifier: "button2"
[Error] Unit1.pas(267): Undeclared identifier: "idTCPClient1"
[Error] Unit1.pas(267): Missing operator or semicolon
[Error] Unit1.pas(268): Undeclared identifier: "message1"
[Error] Unit1.pas(269): Undeclared identifier: "button3"
[Error] Unit1.pas(270): Missing operator or semicolon
[Error] Unit1.pas(271): Undeclared identifier: "memo1"
[Error] Unit1.pas(272): Missing operator or semicolon
[Error] Unit1.pas(273): "." expected but ";" found
[Warning] Unit1.pas(274): Text after final "END." - ignored by compiler
[Error] Unit1.pas(45): Unsatisfied forward or external declaration: "TMyChat.FormCloseQuery"
[Error] Unit1.pas(48): Unsatisfied forward or external declaration: "TMyChat.IdTCPServer1Execute"
[Error] Unit1.pas(49): Unsatisfied forward or external declaration: "TMyChat.N2Click"
[Error] Unit1.pas(50): Unsatisfied forward or external declaration: "TMyChat.FormClose"
[Error] Unit1.pas(51): Unsatisfied forward or external declaration: "TMyChat.Button5Click"
[Error] Unit1.pas(52): Unsatisfied forward or external declaration: "TMyChat.FormDestroy"
[Error] Unit1.pas(57): Unsatisfied forward or external declaration: "TMyChat.MyTrayIconNotify"
[Fatal Error] Unit1.pas(12): Could not compile used unit "Unit1"


 
cyborg ©   (2004-07-17 08:58) [4]

Это не лажа, это диагноз.


 
Григорьев Антон ©   (2004-07-17 09:04) [5]

А вот тот же самый вопрос, но в более полном виде :))
http://www.delphikingdom.com/asp/answer.asp?IDAnswer=23805


 
banderas ©   (2004-07-17 09:19) [6]

:) Это я и написал


 
GanibalLector ©   (2004-07-17 09:34) [7]

[Error] Unit1.pas(263): ";" expected but "ELSE" found

что-то типа if a>b then a:=0 ; else b:=0;
//убрать ;

[Error] Unit1.pas(266): Undeclared identifier: "button2"
Нет button2

[Error] Unit1.pas(267): Undeclared identifier: "idTCPClient1"
тоже самое.Отстутствует idTCPClient1

[Error] Unit1.pas(267): Missing operator or semicolon
Что-то вроде несоответствия типов.Т.е. например integer вышел за границы.

дальше в лом...все одинаковое,млин


 
banderas ©   (2004-07-17 10:17) [8]

Да нет всё у меня есть и button1 и idTCPClient1 и типы соответствуют и после end"a (перед else) не стоит ";"


 
Vit@ly ©   (2004-07-17 10:32) [9]

Выложи строки примерно с 230-240 по 265
Возможно все увидим в чем проблема


 
banderas ©   (2004-07-17 11:05) [10]

Вот вся процедура

{При нажатии на кнопку "Connect"} ***********строка 190
procedure TMyChat.Button3Click(Sender: TObject);
var
msg:string;
ExitFlag:boolean;
begin
{Если клиент неактивен то}
if idTCPClient1.Connected=false then
begin
 idTCPClient1.Host:=host.Text; //IP сервера равен host.Text
 idTCPClient1.Connect(-1); //Соединение
 message1.Enabled:=true; //Ввод текста разрешон
     {Если сервер не активен то}
 if idTCPServer1.Active=false then
  begin
   MyChat.Caption:="MyChat Client"; //Присваеваем новый заголовок форме
    button2.Enabled:=false; //Дизактивируем кнопку "Создать Host"
    idTCPClient1.WriteLn("К нам присоединился "+nam);
   button3.Caption:="Disconnect"; //Присваеваем кнопке новый текст
  end
    {Если сервер активен то}
 else
  begin
   button3.Enabled:=false; //Дизактивируем кнопку Connect
   button3.Caption:="Connection"; //Присваеваем кнопке новый текст
  end
end;

 ExitFlag:=False;

{Осуществляем цикл с пост условием}
 repeat
  try
    msg:=idTCPClient1.ReadLn("",1,9999999); //Делаем запрос на сокет сервера
    MyChat.Show; //Показываем форму
    MyChat.FormDestroy(self); //Удоляем иконку
{Если сообщение не содержи призыва завершить работу то...}
    if msg <> cod1 then
    begin
     memo1.Lines.Add(msg); //Добавляем сообщение в memo1
     if form1.CheckBox1.Checked=true then MessageBeep(1); //Если есть "галочка" то играет звук
    end
        {если пришло сообщение о disconnect то}
   else
    begin
     {Если сервер неактивен то...}
     if idTCPServer1.Active=false then
     begin
     {Выводим сообщение о обрушении сервера}
     application.MessageBox(Pchar("Сервер: "+host.Text+" прикратил работу"),"MyChat",MB_ICONINFORMATION);
     bitbtn1.Click; //Нажимаем на кнопку "Очистиь"
     MyChat.Caption:="MyChat"; //Присваеваем новый заголовок форме
     idTCPClient1.Disconnect; //Отсоединяемся от сервера
     message1.Enabled:=false; //Дизактивируем message1
     button3.Caption:="Connect";
     button2.Enabled:=true;
     end
      else {А если активен то...}
      begin
       idTCPClient1.Disconnect;
       idTCPServer1.Active:=false;
       message1.Enabled:=false;
       button3.Caption:="Connect";
      end;
    end;
   except
   ExitFlag := true;
   end;
 until (msg = cod1) or (ExitFlag=true);

end
else
begin
   MyChat.Caption:="MyChat";
   button2.Enabled:=true;
   idTCPClient1.WriteLn("От нас ушел: "+nam);
   message1.Enabled:=false;
   button3.Caption:="Connect";
   idTCPClient1.Disconnect;
   memo1.Clear;
   memo1.Lines.Add(ver+lIP);
 end;
end; ******строка ******* 272


 
Baron ©   (2004-07-17 11:12) [11]

Ему код выкладывать стыдно.
Да-уж, проблема у чела. Да еще компилятор прикалывается(banderas ©  (17.07.04 08:57) [3]).

Undeclared identifier: - компилятору не известен идентификатор
";" expected but "ELSE" found - компил. ожидает ";" а находит "else"
Text after final "END." - ignored by compiler - Компил. игнорирует текст за закрывающим end.
Missing operator or semicolon - неправильный оператор.
Unsatisfied forward or external declaration:-
This error message appears when you have a forward or external declaration of a procedure or function, or a declaration of a method in a class or object type, and you don"t define the procedure, function or method anywhere.

Maybe the definition is really missing, or maybe its name is just misspelled.

Note that a declaration of a procedure or function in the interface section of a unit is equivalent to a forward declaration - you have to supply the implementation (the body of the procedure or function) in the implementation section.

Similarly, the declaration of a method in a class or object type is equivalent to a forward declaration.

program Produce;

type
 TMyClass = class
 constructor Create;
 end;

function Sum(const a: array of Double): Double; forward;

function Summ(const a: array of Double): Double;
var
 i: Integer;
begin
 Result := 0.0;
 for i:= 0 to High(a) do
 Result := Result + a[i];
end;

begin
end.

The definition of Sum in the above example has an easy-to-spot typo.

program Solve;

type
 TMyClass = class
 constructor Create;
 end;

constructor TMyClass.Create;
begin
end;

function Sum(const a: array of Double): Double; forward;

function Sum(const a: array of Double): Double;
var
 i: Integer;
begin
 Result := 0.0;
 for i:= 0 to High(a) do
 Result := Result + a[i];
end;

begin
end.

The solution: make sure the definitions of your procedures, functions and methods are all there, and spelled correctly.
А вообще юзай help >Compiler Errors


 
infom ©   (2004-07-17 11:17) [12]

А если заменить этот кусок
begin
  MyChat.Caption:="MyChat";
  button2.Enabled:=true;
  idTCPClient1.WriteLn("От нас ушел: "+nam);
  message1.Enabled:=false;
  button3.Caption:="Connect";
  idTCPClient1.Disconnect;
  memo1.Clear;
  memo1.Lines.Add(ver+lIP);
end;


на этот
with MyChat do
begin
  Caption:="MyChat";
  button2.Enabled:=true;
  idTCPClient1.WriteLn("От нас ушел: "+nam);
  message1.Enabled:=false;
  button3.Caption:="Connect";
  idTCPClient1.Disconnect;
  memo1.Clear;
  memo1.Lines.Add(ver+lIP);
end;


 
banderas ©   (2004-07-17 11:20) [13]

Заменил и вот
[Error] Unit1.pas(261): Declaration expected but "WITH" found
[Error] Unit1.pas(263): Undeclared identifier: "Caption"
[Error] Unit1.pas(264): Undeclared identifier: "button2"
[Error] Unit1.pas(265): Undeclared identifier: "idTCPClient1"
[Error] Unit1.pas(265): Missing operator or semicolon
[Error] Unit1.pas(266): Undeclared identifier: "message1"
[Error] Unit1.pas(267): Undeclared identifier: "button3"
[Error] Unit1.pas(268): Missing operator or semicolon
[Error] Unit1.pas(269): Undeclared identifier: "memo1"
[Error] Unit1.pas(270): Missing operator or semicolon
[Error] Unit1.pas(271): "." expected but ";" found
[Fatal Error] Unit1.pas(10): Could not compile used unit "Unit1"
С этим кодом раньше было все нормально но после того как я начал коментарии подписывать что то случилось...


 
infom ©   (2004-07-17 11:28) [14]


> [Error] Unit1.pas(261): Declaration expected but "WITH"
> found

Cel. по этому ты что-то не правильно заменил ... щас разберемся ...


 
Alx2 ©   (2004-07-17 11:28) [15]

>banderas ©   (17.07.04 11:20) [13]
У тебя (в неисправленном варианте) после until стоит end. Он к чему относится?


 
infom ©   (2004-07-17 11:31) [16]

Короче
Непонятно к чему относится код после until ...


 
infom ©   (2004-07-17 11:39) [17]

А вот это работает, если да то как ?
bitbtn1.Click; //Нажимаем на кнопку "Очистиь"


 
banderas ©   (2004-07-17 11:40) [18]

>У тебя (в неисправленном варианте) после until стоит end. Он к чему относится?
>Непонятно к чему относится код после until ...

Он относится к
{Если клиент неактивен то}
if idTCPClient1.Connected=false then
begin

то есть если я нажимаю на кнопку второй раз то этот код выполняется
МОГУ ЗАКАЧАТЬ ИСХОДНИКИ НА МЫЛО (только не публикуйте без ссылки на автора :) )


 
banderas ©   (2004-07-17 11:42) [19]

>А вот это работает, если да то как ?
bitbtn1.Click; //Нажимаем на кнопку "Очистиь"

procedure TMyChat.BitBtn1Click(Sender: TObject);
begin
memo1.Clear;
memo1.Lines.Add(ver+lIP);
end;


 
Alx2 ©   (2004-07-17 11:43) [20]

Тогда убери end перед  ExitFlag := False;


 
Baron ©   (2004-07-17 11:51) [21]

banderas ©  (17.07.04 11:40) [18]
>(только не публикуйте без ссылки на автора :) )
Хе-хе. Без ссылки в проге на автора отладки помогать не буду.


 
banderas ©   (2004-07-17 11:52) [22]

Я обожаю ЭТОТ ФОРУМ И ВСЕХ КТО ПОМОГАЕТ НАЧИНАЮЩИМ ПРОГРАМЕРАМ :)


 
banderas ©   (2004-07-17 11:53) [23]

СПАСИБО ЕЩЁ РАЗ ТЕПЕРЬ ВСЁ ОК


 
Verg ©   (2004-07-17 11:53) [24]

Элементарно не сходятся пары скобок begin-end


 
Anatoly Podgoretsky ©   (2004-07-17 12:20) [25]

А нечего читать советы про расстановку комментариев задним числом. Предупреждали же.


 
Soft ©   (2004-07-18 00:27) [26]

{Осуществляем цикл с пост условием}

А в коментариях на Delphi разве можно букву я ставить. Она вроде соответствует коду FF. Во всяком случае один из сишных компилятор страшно пучило от я.


 
DrPass ©   (2004-07-18 11:35) [27]

Вообще-то ученые еще не обнаружили связь между кодом FF и стабильностью работы компилятора


 
Lenor   (2004-07-18 20:24) [28]

А кто-нибудь в TheSims играл? Там я вообще не работает



Страницы: 1 вся ветка

Текущий архив: 2004.08.01;
Скачать: CL | DM;

Наверх




Память: 0.54 MB
Время: 0.047 c
6-1086098144
Джек
2004-06-01 17:55
2004.08.01
TWebBrowser и "Ошибка сценария..."


1-1090386061
pavel_pavel
2004-07-21 09:01
2004.08.01
Общение с другой прогой


14-1089791499
Polevi
2004-07-14 11:51
2004.08.01
link


1-1090392773
denmin
2004-07-21 10:52
2004.08.01
Как узнать на каком Label кликнули мышью?


1-1089870421
Pavelkq
2004-07-15 09:47
2004.08.01
Страшные тормоза при работе программы.