Autor Beitrag
Beatbox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Sa 10.12.05 12:11 
Hi,

ich kriege das einfach nicht hin, suche und probiere echt schon ewig!!

Ich würde gerne den Inhalt einer Variable zum Beispiel "Beatbox" in eine
TXT Datei speicher... ich kenn das leider bisher nur von Memofeldern etc...
Hat jemand von euch ne Ahnung wie das funktioniert??

Danke Euch!!
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Sa 10.12.05 12:59 
Titel: Voila
Hier der Code zum Speichern

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.Button3Click(Sender: TObject);
var f:TeXtfile;

begin
AssignFile(f,'C:\da wo dus hin willst');
Rewrite(f);
Write(f,deinevariable);
CloseFile(f);
end;


Hier zum Laden :

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1Click(Sender: TObject);
var f:TeXtfile;
begin
 AssignFile(F, 'C:\wohers kommen soll.txt'); 
    Reset(F);
    Readln(F, DeineVariable);           
    CloseFile(F);
end;


Moderiert von user profile iconraziel: Delphi-Tags korrigiert.
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Sa 10.12.05 13:23 
Hängt ein bisschen davon ab, von welchem Typ deine Variable "BeatBox" ist.