Autor Beitrag
elduchte
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 199

Win 2000, Win XP
Delphi 7
BeitragVerfasst: Di 16.05.06 14:21 
Hallo,

ausblenden Delphi-Quelltext
1:
procedure AssignFile(var F; FileName: string);					


Kann mit jemand mal bitte o. a. Prozedur erklären? FileName ist ja noch verständlich, aber warum die Variable "F" ??

Die OH habe ich nicht genau verstanden:
Zitat:
Die Prozedur weist einer Dateivariablen den Namen einer externen Datei zu.


Wofür brauche ich F ?? Soll das sowas wie ein Zeiger sein?

Danke
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 16.05.06 14:25 
Du musst doch später für deine Dateioperationen eine Variable haben, mit der du bestimmst, in welche Datei du schreibst. Diese Variable ist F.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 16.05.06 14:46 
Beispiel:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var
  f: TextFile;
begin
  AssignFile (f, 'test.txt');
  Rewrite( f);
  WriteLn( f, 'Hallo Welt!');
  CloseFile (f);
end;

_________________
Markus Kinzler.
elduchte Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 199

Win 2000, Win XP
Delphi 7
BeitragVerfasst: Di 16.05.06 17:30 
Alles klar, danke