|
Вопрос # 1 667/ вопрос открыт / |
|
Доброго времени суток, уважаемые эксперты!
В прикрепленном файле все сведения...
К вопросу прикреплён файл. Загрузить » (срок хранения: 60 дней с момента отправки вопроса)
Приложение: Переключить в обычный режим- unit Unit1;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, Grids;
-
- type
-
-
-
-
-
-
- End;
-
- TForm1 = class(TForm)
- StringGrid1: TStringGrid;
- OpenDialog1: TOpenDialog;
- Button1: TButton;
- Button2: TButton;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
-
-
-
-
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- const
-
-
-
-
- var
- Form1: TForm1;
-
-
-
- implementation
-
- {$R *.dfm}
-
-
- procedure Add_Worker(var root:PWorker; Work:TWorker);
- var temp_Worker:PWorker;
- begin
- temp_Worker:=root;
- if (temp_Worker<>nil) then
- begin
- while (temp_Worker^.Next<>nil) do
- temp_Worker:=temp_Worker^.Next;
- New(temp_Worker^.Next);
- temp_Worker:=temp_Worker^.Next;
- end
- else
- begin
- New(temp_Worker);
- root:=temp_Worker;
- end;
- temp_Worker^.fam:=Work.fam;
- temp_Worker^.name:=Work.name;
- temp_Worker^.otc:=Work.otc;
- temp_Worker^.Next:=nil;
- end;
-
-
-
- procedure TForm1.write_Worker(root:PWorker);
- var temp_Worker:PWorker;
- i:integer;
- begin
- i:=1;
- temp_Worker:=root;
- if (root<>nil) then
- While (temp_Worker<>nil)
- do
- begin
- StringGrid1.Cells[0,i]:=IntToStr(i);
- StringGrid1.Cells[1,i]:=temp_Worker.fam;
- StringGrid1.Cells[2,i]:=temp_Worker.name;
- StringGrid1.Cells[3,i]:=temp_Worker.otc;
- i:=i+1;
- temp_Worker:=temp_Worker^.Next;
- StringGrid1.RowCount:=i;
- end;
- end;
-
-
- procedure TForm1.Button1Click(Sender: TObject);
- var FileName:string;
- begin
-
- begin
-
- AssignFile(Fil, FileName);
- Label1.Caption:=FileName;
-
- end;
- root:=nil;
- end;
-
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
-
-
-
-
-
-
- end;
-
-
- procedure TForm1.Button2Click(Sender: TObject);
-
-
-
- begin
-
-
- StringGrid1.Cells[0,1]:='';
- StringGrid1.Cells[1,1]:='';
- StringGrid1.Cells[2,1]:='';
- StringGrid1.Cells[3,1]:='';
-
-
- Reset(Fil);
- Readln(Fil,s);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- do
- begin
-
- if (Length(s)>0) then
- OemToChar(Pchar(S), Pchar(S));
- i:=Pos(a2,s);
-
-
- continue;
-
-
-
- begin
- i:=i+1;
- end;
-
- Work.fam:='';
-
- while (s[i]<>'"') do
- begin
- Insert(s[i],Work.fam,length(Work.fam)+1);
-
- i:=i+1;
- end;
-
-
- Work.name:='';
- while (s[i]<>'"') do
- begin
- Insert(s[i],Work.name,length(Work.name)+1);
- i:=i+1;
- end;
-
-
- Work.otc:='';
- while (s[i]<>'"') do
- begin
- Insert(s[i],Work.otc,length(Work.otc)+1);
- i:=i+1;
- end;
- Work.Next:=nil;
-
- Add_Worker(root,Work);
- end;
-
- CloseFile(Fil);
-
- end;
- end.
 |
Вопрос задал: Fearless (статус: Посетитель)
Вопрос отправлен: 7 июня 2008, 12:58
Состояние вопроса: открыт, ответов: 0.
|
Мини-форум вопроса
Мини-форум пуст.
Чтобы оставлять сообщения в мини-форумах, Вы должны авторизироваться на сайте.
|