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:
| const max=500; type feld=array[0..max,0..max] of string; var biblio : feld;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject); begin StringGrid1.Cells[0,0]:='Lfd. Nr'; StringGrid1.Cells[1,0]:='Autor'; StringGrid1.Cells[2,0]:='Buchtitel'; StringGrid1.Cells[3,0]:='Verliehen am'; StringGrid1.Cells[4,0]:='Verliehen an'; StringGrid1.Cells[5,0]:='V?'; StringGrid1.Cells[6,0]:='R?'; end;
procedure TForm1.Speichern1Click(Sender: TObject); var datei : file of feld; i,r,s : integer; begin r:=StringGrid1.RowCount; for i:=1 to r do begin for s:=0 to 7 do begin biblio[s,i]:=StringGrid1.Cells[s,i]; end; end; if SaveDialog1.Execute then begin assignFile(datei,SaveDialog1.FileName); rewrite(datei); write(datei,biblio); closeFile(datei); end; end; |