Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Программирование [игнор отключен] [закрыт для гостей] / работа с типизированными файлами / 5 сообщений из 5, страница 1 из 1
22.06.2013, 19:58
    #38307140
sds95
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
работа с типизированными файлами
Ребята, помогите пожалуйста! Нужно срочно. Не знаю как написать.

Разработать программу ведения файла, содержащего некоторые данные.
Сведения о больных
фамилия;
пол;
возраст;
номер палаты;
диагноз.

В программе должны быть реализованы следующие функции:
ввод записей;
корректировка записей;
удаление записей;
просмотр записей на экране.
...
Рейтинг: 0 / 0
22.06.2013, 20:02
    #38307143
sds95
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
работа с типизированными файлами
sds95Разработать программу ведения файла, содержащего некоторые данные.
Сведения о больных
фамилия;
пол;
возраст;
номер палаты;
диагноз.

этот кусок у меня есть. вот код


код
Код: pascal
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
349.
350.
351.
352.
353.
354.
355.
356.
357.
358.
359.
360.
361.
362.
363.
364.
365.
366.
367.
368.
369.
unit Unit1;

interface

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

type

  prig = record       //список сведений
         Name:string[80];
         pol:string[10];
         age:real;
         palata:integer;
         diag: string[55];

  end;

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    MainMenu1: TMainMenu;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    OpenDialog1: TOpenDialog;
    SaveDialog1: TSaveDialog;
    StringGrid1: TStringGrid;
    N1: TMenuItem;
    N2: TMenuItem;
    N3: TMenuItem;
    N4: TMenuItem;
    N5: TMenuItem;
    procedure StringGrid1KeyPress(Sender: TObject; var Key: Char);
    procedure FormShow(Sender: TObject);
    procedure N6Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure N2Click(Sender: TObject);
    procedure N3Click(Sender: TObject);
    function  check(a:prig):boolean;
    procedure BitBtn2Click(Sender: TObject);
    procedure Edit1KeyPress(Sender: TObject; var Key: Char);
    procedure N4Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  filename: string;

implementation

{$R *.dfm}


//Помечаем столбцы названиями

procedure TForm1.FormShow(Sender: TObject);
begin
  with StringGrid1 do
  begin
    Cells[0,0]:='Фамилия';
    Cells[1,0]:='Пол';
    Cells[2,0]:='Возраст';
    Cells[3,0]:='Палата';
    Cells[4,0]:='Диагноз';
  end;
 loadkeyboardlayout('00000419',klf_activate);
end;

//Выход из программы

procedure TForm1.N6Click(Sender: TObject);
begin
  form1.Close;
end;

//Открытие файла

procedure TForm1.N2Click(Sender: TObject);
var
 f:file of prig;
 a:prig;
 i:integer;
begin
 if opendialog1.execute then
 begin
 filename:=opendialog1.FileName;  //имя файла храним глобально, и записываем туда вопросы
  assignfile(f,filename);
  reset(f);
  for i:=1 to filesize(f) do
    begin
     read(f,a);
     stringgrid1.Cells[0,i]:=a.Name;
     stringgrid1.Cells[1,i]:=a.pol;
     stringgrid1.Cells[2,i]:=floattostr(a.age);
     stringgrid1.Cells[3,i]:=floattostr(a.palata);
     stringgrid1.Cells[4,i]:=a.diag;
     stringgrid1.RowCount:=stringgrid1.RowCount + 1;
    end;
 closefile(f);
 end;
end;

//Создаем файл для записей

procedure TForm1.N3Click(Sender: TObject);
var
 f:file of prig;
 a:prig;
begin
  if savedialog1.execute then
   begin
    assignfile(f,savedialog1.filename+'.dat');
    filename:=savedialog1.FileName +'.dat';       //имя файла записываем глобально
    rewrite(f);
    closefile(f);
   end;
end;

//Обработка ввода в stringgrid

procedure TForm1.StringGrid1KeyPress(Sender: TObject; var Key: Char);
begin
 if stringgrid1.Row +1 =  stringgrid1.RowCount then
  stringgrid1.RowCount:=stringgrid1.RowCount +1;

  case stringgrid1.Col of
  0,1,4: case key of
        'А'..'Я' ,'а'..'я',#08:;
        else
         key:=#0;
        end;
  2,3: case key of
         '0'..'9',#08:;
         else
          key:=#0;
         end;
   end;
end;

//Отсеивание через фильтр

function Tform1.check(a:prig):boolean;
begin

    if edit1.text<>'' then
      if a.Name=edit1.text then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit2.text<>'' then
      if a.age>=strtoint (edit2.text) then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit3.text<>'' then
      if a.age<=strtoint (edit3.text) then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit4.text<>'' then
      if a.pol=edit4.text then
      check:=true
      else
      begin
        check:=false;
      end;

    if edit5.text<>'' then
      if a.palata=strtoint (edit5.text) then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit6.text<>'' then
      if a.diag=edit6.Text then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

end;

//Удаление строки

procedure TForm1.N4Click(Sender: TObject);
var
 a:prig;
 i:integer;
begin
   for i:= stringgrid1.Row to stringgrid1.RowCount do
    begin
     stringgrid1.Cells[0,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[1,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[2,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[3,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[4,i]:=stringgrid1.Cells[0,i+1];
    end;
    stringgrid1.RowCount:=stringgrid1.RowCount -1;
end;

//Сброс

procedure TForm1.Button3Click(Sender: TObject);
begin
 edit1.Text:='';
 edit2.Text:='';
 edit3.Text:='';
 edit4.Text:='';
 edit5.Text:='';
 edit6.Text:='';
end;

//Проверка ввода в Edit-ы в фильтре

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
var
ed:tedit;
begin
  ed:=sender as Tedit;
 case key of
 'А'..'Я','а'..'я': if ed.Tag <=5 then
                      key:=#0;
 '0'..'9': if ed.Tag>5 then
             key:=#0;
 ',','.': if (pos(decimalseparator,ed.Text) =0) and (ed.Tag<=5) then
             key:=decimalseparator
           else
             key:=#0;
 #08:;
 #13: button2.Click;
 else
  key:=#0;
 end;
end;

//Запись

procedure TForm1.Button1Click(Sender: TObject);
var
 i,j:integer;
 f:file of prig;
 a:prig;
begin
 if filename = '' then
  begin
   showmessage('Откройте или создайте файл, меню Файл ->');
   exit;
  end;
 for i:=1 to stringgrid1.RowCount -2 do
  for j:=0 to 4 do
   if stringgrid1.Cells[j,i] ='' then
    begin
     showmessage('Заполните все ячейки');
     stringgrid1.Row:=i;
     stringgrid1.Col:=j;
     exit;
    end;
     assignfile(f,filename);
     reset(f);
     for i:=1 to stringgrid1.RowCount - 2 do
      begin
       a.Name:=stringgrid1.Cells[0,i];
       a.pol:=stringgrid1.Cells[1,i];
       a.age:=strtoint(stringgrid1.cells[2,i]);
       a.palata:=strtoint(stringgrid1.Cells[3,i]);
       a.diag:=stringgrid1.Cells[4,i];
      write(f,a);
      end;
      showmessage('Все успешно записанно');
     closefile(f);
end;

//Применение фильтра

procedure TForm1.BitBtn2Click(Sender: TObject);
var
 a,a1:array of prig;
 i,j,k:integer;
 max:prig;
 f:file of prig;
begin
 if filename='' then
 begin
  showmessage('Откройте файл для чтения Файл->');
  exit;
 end;
 assignfile(f,filename);
 reset(f);
  setlength(a,filesize(f)+1);
  for i:=1 to filesize(f)  do
   read(f,a[i]);
   j:=filesize(f) ;

// ***************************************
   while j>0 do          //Сортируем по убыванию рекорда
   begin
   max:=a[1];
   k:=1;
   for i:=2 to j do
    if a[i].age < max.age then
    begin
     k:=i;
     max:=a[i];
    end;
   a[k]:=a[j];
   a[j]:=max;
   dec(j);
  end;
//********************************************
    j:=filesize(f) ;
  with StringGrid1 do
    begin
      for i:=1 to ColCount+1 do
        for j:=1 to RowCount+1 do
          Cells[j-1,i-1]:='';
    end;              //очищаем стринггрид
        k:=0;
   for i:=1 to j do    //Обходим все элементы массива
    if check(a[i]) then   //применяем фильтр
    begin
      inc(k);               //увеличиваем строку
      with StringGrid1 do
        begin
          Cells[0,k]:=a[i].Name;           //выводим информацию
          Cells[1,k]:=a[i].pol;
          Cells[2,k]:=floattostr(a[i].age);
          Cells[3,k]:=floattostr(a[i].palata);
          Cells[4,k]:=a[i].diag;
        end;
    end;
   a:=nil;         //удаляем массив
end;

end.

...
Рейтинг: 0 / 0
22.06.2013, 20:03
    #38307145
sds95
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
работа с типизированными файлами
sds95
Сведения о больных
фамилия;
пол;
возраст;
номер палаты;
диагноз.

этот кусок у меня есть. вот код

код
Код: pascal
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
349.
350.
351.
352.
353.
354.
355.
356.
357.
358.
359.
360.
361.
362.
363.
364.
365.
366.
367.
368.
369.
unit Unit1;

interface

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

type

  prig = record       //список сведений
         Name:string[80];
         pol:string[10];
         age:real;
         palata:integer;
         diag: string[55];

  end;

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    MainMenu1: TMainMenu;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    OpenDialog1: TOpenDialog;
    SaveDialog1: TSaveDialog;
    StringGrid1: TStringGrid;
    N1: TMenuItem;
    N2: TMenuItem;
    N3: TMenuItem;
    N4: TMenuItem;
    N5: TMenuItem;
    procedure StringGrid1KeyPress(Sender: TObject; var Key: Char);
    procedure FormShow(Sender: TObject);
    procedure N6Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure N2Click(Sender: TObject);
    procedure N3Click(Sender: TObject);
    function  check(a:prig):boolean;
    procedure BitBtn2Click(Sender: TObject);
    procedure Edit1KeyPress(Sender: TObject; var Key: Char);
    procedure N4Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  filename: string;

implementation

{$R *.dfm}


//Помечаем столбцы названиями

procedure TForm1.FormShow(Sender: TObject);
begin
  with StringGrid1 do
  begin
    Cells[0,0]:='Фамилия';
    Cells[1,0]:='Пол';
    Cells[2,0]:='Возраст';
    Cells[3,0]:='Палата';
    Cells[4,0]:='Диагноз';
  end;
 loadkeyboardlayout('00000419',klf_activate);
end;

//Выход из программы

procedure TForm1.N6Click(Sender: TObject);
begin
  form1.Close;
end;

//Открытие файла

procedure TForm1.N2Click(Sender: TObject);
var
 f:file of prig;
 a:prig;
 i:integer;
begin
 if opendialog1.execute then
 begin
 filename:=opendialog1.FileName;  //имя файла храним глобально, и записываем туда вопросы
  assignfile(f,filename);
  reset(f);
  for i:=1 to filesize(f) do
    begin
     read(f,a);
     stringgrid1.Cells[0,i]:=a.Name;
     stringgrid1.Cells[1,i]:=a.pol;
     stringgrid1.Cells[2,i]:=floattostr(a.age);
     stringgrid1.Cells[3,i]:=floattostr(a.palata);
     stringgrid1.Cells[4,i]:=a.diag;
     stringgrid1.RowCount:=stringgrid1.RowCount + 1;
    end;
 closefile(f);
 end;
end;

//Создаем файл для записей

procedure TForm1.N3Click(Sender: TObject);
var
 f:file of prig;
 a:prig;
begin
  if savedialog1.execute then
   begin
    assignfile(f,savedialog1.filename+'.dat');
    filename:=savedialog1.FileName +'.dat';       //имя файла записываем глобально
    rewrite(f);
    closefile(f);
   end;
end;

//Обработка ввода в stringgrid

procedure TForm1.StringGrid1KeyPress(Sender: TObject; var Key: Char);
begin
 if stringgrid1.Row +1 =  stringgrid1.RowCount then
  stringgrid1.RowCount:=stringgrid1.RowCount +1;

  case stringgrid1.Col of
  0,1,4: case key of
        'А'..'Я' ,'а'..'я',#08:;
        else
         key:=#0;
        end;
  2,3: case key of
         '0'..'9',#08:;
         else
          key:=#0;
         end;
   end;
end;

//Отсеивание через фильтр

function Tform1.check(a:prig):boolean;
begin

    if edit1.text<>'' then
      if a.Name=edit1.text then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit2.text<>'' then
      if a.age>=strtoint (edit2.text) then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit3.text<>'' then
      if a.age<=strtoint (edit3.text) then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit4.text<>'' then
      if a.pol=edit4.text then
      check:=true
      else
      begin
        check:=false;
      end;

    if edit5.text<>'' then
      if a.palata=strtoint (edit5.text) then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

    if edit6.text<>'' then
      if a.diag=edit6.Text then
      check:=true
      else
      begin
        check:=false;
        exit;
      end;

end;

//Удаление строки

procedure TForm1.N4Click(Sender: TObject);
var
 a:prig;
 i:integer;
begin
   for i:= stringgrid1.Row to stringgrid1.RowCount do
    begin
     stringgrid1.Cells[0,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[1,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[2,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[3,i]:=stringgrid1.Cells[0,i+1];
     stringgrid1.Cells[4,i]:=stringgrid1.Cells[0,i+1];
    end;
    stringgrid1.RowCount:=stringgrid1.RowCount -1;
end;

//Сброс

procedure TForm1.Button3Click(Sender: TObject);
begin
 edit1.Text:='';
 edit2.Text:='';
 edit3.Text:='';
 edit4.Text:='';
 edit5.Text:='';
 edit6.Text:='';
end;

//Проверка ввода в Edit-ы в фильтре

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
var
ed:tedit;
begin
  ed:=sender as Tedit;
 case key of
 'А'..'Я','а'..'я': if ed.Tag <=5 then
                      key:=#0;
 '0'..'9': if ed.Tag>5 then
             key:=#0;
 ',','.': if (pos(decimalseparator,ed.Text) =0) and (ed.Tag<=5) then
             key:=decimalseparator
           else
             key:=#0;
 #08:;
 #13: button2.Click;
 else
  key:=#0;
 end;
end;

//Запись

procedure TForm1.Button1Click(Sender: TObject);
var
 i,j:integer;
 f:file of prig;
 a:prig;
begin
 if filename = '' then
  begin
   showmessage('Откройте или создайте файл, меню Файл ->');
   exit;
  end;
 for i:=1 to stringgrid1.RowCount -2 do
  for j:=0 to 4 do
   if stringgrid1.Cells[j,i] ='' then
    begin
     showmessage('Заполните все ячейки');
     stringgrid1.Row:=i;
     stringgrid1.Col:=j;
     exit;
    end;
     assignfile(f,filename);
     reset(f);
     for i:=1 to stringgrid1.RowCount - 2 do
      begin
       a.Name:=stringgrid1.Cells[0,i];
       a.pol:=stringgrid1.Cells[1,i];
       a.age:=strtoint(stringgrid1.cells[2,i]);
       a.palata:=strtoint(stringgrid1.Cells[3,i]);
       a.diag:=stringgrid1.Cells[4,i];
      write(f,a);
      end;
      showmessage('Все успешно записанно');
     closefile(f);
end;

//Применение фильтра

procedure TForm1.BitBtn2Click(Sender: TObject);
var
 a,a1:array of prig;
 i,j,k:integer;
 max:prig;
 f:file of prig;
begin
 if filename='' then
 begin
  showmessage('Откройте файл для чтения Файл->');
  exit;
 end;
 assignfile(f,filename);
 reset(f);
  setlength(a,filesize(f)+1);
  for i:=1 to filesize(f)  do
   read(f,a[i]);
   j:=filesize(f) ;

// ***************************************
   while j>0 do          //Сортируем по убыванию рекорда
   begin
   max:=a[1];
   k:=1;
   for i:=2 to j do
    if a[i].age < max.age then
    begin
     k:=i;
     max:=a[i];
    end;
   a[k]:=a[j];
   a[j]:=max;
   dec(j);
  end;
//********************************************
    j:=filesize(f) ;
  with StringGrid1 do
    begin
      for i:=1 to ColCount+1 do
        for j:=1 to RowCount+1 do
          Cells[j-1,i-1]:='';
    end;              //очищаем стринггрид
        k:=0;
   for i:=1 to j do    //Обходим все элементы массива
    if check(a[i]) then   //применяем фильтр
    begin
      inc(k);               //увеличиваем строку
      with StringGrid1 do
        begin
          Cells[0,k]:=a[i].Name;           //выводим информацию
          Cells[1,k]:=a[i].pol;
          Cells[2,k]:=floattostr(a[i].age);
          Cells[3,k]:=floattostr(a[i].palata);
          Cells[4,k]:=a[i].diag;
        end;
    end;
   a:=nil;         //удаляем массив
end;

end.

...
Рейтинг: 0 / 0
22.06.2013, 22:41
    #38307192
eNose
Участник
[не активирован]
[не одобрен]
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
работа с типизированными файлами
Товарищ, заворачивайте, плиз, код в соответствующие теги.
...
Рейтинг: 0 / 0
22.06.2013, 22:46
    #38307197
sds95
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
работа с типизированными файлами
eNose,

ок)
...
Рейтинг: 0 / 0
Форумы / Программирование [игнор отключен] [закрыт для гостей] / работа с типизированными файлами / 5 сообщений из 5, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]