Показать сообщение отдельно
  #1  
Старый 12.12.2008, 09:13
mazaev87 mazaev87 вне форума
Прохожий
 
Регистрация: 02.12.2008
Сообщения: 4
Репутация: 10
По умолчанию Ошибки в программе, помогите разобраться!

Код:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    Memo1: TMemo;
    OpenDialog1: TOpenDialog;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.Execute;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
AFile:textFile;
Field,data,vals:Tstringlist;
i:integer;
line,line1,rec:string;
Potok:TStringStream;
begin
  Field:=TStringList.Create;
  data:=TStringlist.Create;
  Potok:=TStringStream.Create(rec);
  try
    begin
    Assignfile(Afile,openDialog1.FileName);
    Reset(Afile);
    While not (AFile) do
    begin
    Readln(AFile,rec);
    potok.WriteString(rec);
end;
end;
System.CloseFile(Afile);
line:=Potok.DataString;
line1:=Stringreplace(line,')))','^',[rfReplaceall]);
line:=stringReplace(line1,' ','_',[rfReplaceall]);
  field.Clear;
  data.Clear;
  vals.Clear;
      Field.Delimiter:='^';   
      Vals.Delimiter:='|'; 
      Data.Delimiter:='=';  
      Field.DelimitedText:=line;
      memo1.Lines.Append(line);
end.
Admin: Пользуемся тегами!

-------------------------ошибки-------------------------------
Build
[Error] Unit1.pas(51): Operator not applicable to this operand type
[Error] Unit1.pas(69): EXCEPT or FINALLY expected
[Error] Unit1.pas(71): 'END' expected but end of file found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
---------------------------------P.S----------------
Благодарю за помощь
Ответить с цитированием