Autor Beitrag
Dommel
Hält's aus hier
Beiträge: 12



BeitragVerfasst: Do 05.05.05 14:11 
Hi,

ich versuche in meinem Programm eine Datei mittels TFileStream zu öffnen, um aus ihr zu lesen. Allerdings bekomme ich folgenden Fehler:

ausblenden Delphi-Quelltext
1:
Undeclared identifier: 'fmOpenRead'					


der einzige Parameter, der erkannt wird, ist fmCreate...


Was kann ich tun ??
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Do 05.05.05 14:17 
sysutils oder classes einbinden (weiß jetzt nicht welches das war)

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 05.05.05 14:33 
Unit SysUtils ...

Ansonsten hätte er den TFileStream angemeckert, der ist in der Classes deklariert.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Dommel Threadstarter
Hält's aus hier
Beiträge: 12



BeitragVerfasst: Do 05.05.05 15:15 
Danke für die schnellen Antworten. Es funktioniert soweit...

Allerdings hab ich jetzt das Problem, dass ich keine Strings vernünftig speichern und lesen kann. Integer ist kein Problem. Muss ich da irgendwas besonderes beachten??
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 05.05.05 15:23 
Jip: Du musst die Länge als Prefix speichern:

Schreiben mit:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
X:=Len(S);
FS.WriteBuffer(X, 4);
If X <> 0 Then
    FS.WriteBuffer(S[1], X);


Lesen mit:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
FS.ReadBuffer(X, 4);
SetLength(S, X);
If X <> 0 Then
    FS.ReadBuffer(S[1], X);

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Dommel Threadstarter
Hält's aus hier
Beiträge: 12



BeitragVerfasst: Do 05.05.05 15:42 
hi, jetzt funzt alles

vielen dank!!