![]() |
|
#1
|
||||
|
||||
![]() Мне нужно из 7-ми Edit-ов прочитать информацию, занести в файл, очистить Edit-ты и так по циклу.......
Код:
Procedure TForm1.Button1Click(Sender:TObject); const n_file = 'c:\rec_file.bin'; Var F: File Of TRepp; RD: Array[0..200] of TRepp; PCount,j,i: integer; begin AssignFile(F, n_file); RD[j].FID := Edit1.Text; RD[j].PSurname := Edit2.Text; RD[j].PName := Edit3.Text; RD[j].PPatronymic := Edit4.Text; RD[j].Weight := StrToFloat(Edit5.Text); RD[j].Deqt := Edit6.Text;; RD[j].FDate := StrToDate(Edit7.Text); Writeln(F, RD[j]); ! Здесь выдает ошибку CloseFile(F); j:=j + 1; PCount:=j; For i := 0 To ComponentCount-1 Do ! Здесь выдает ошибку If Components[i] is TEdit Then (Components[i] as TEdit).Text := ''; end; |