Autor Beitrag
Smartie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Mo 27.06.05 09:51 
Servus!

ich werde verschiedene Daten aus meiner INI-Datei lesen.

hierzu habe ich eine kleine Prozedur gebastelt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure error_lesen;
var a : String;
begin
  //ini lesen
  INIError := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'error.ini');

  a := INIError.ReadString('error', 'serror1', ' '); //test
end;




Die INI sieht etwa so aus:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
[error]
serror1=Schreiben Sie bitte eine Neue Zeile.
Und vergessen Sie nicht auch die zweite Zeile zu lesen.
serror2=bla
serror3=blubber
serror4=schwall


Ok, liest er dann nur
Schreiben Sie bitte eine Neue Zeile.

Oder liest er komplett
[highlight]schreiben Sie bitte eine Neue Zeile.
Und vergessen Sie nicht auch die zweite Zeile zu lesen.[/highlight]

Mit anderen Worten, kann ich da über den Zeilenumbruch hinweglesen, oder geht es nur Zeilenweise?

Herzlichen Dank und lieben Gruß


Smartie
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: Mo 27.06.05 11:28 
INIs funktionieren immer nur Zeilenweise.
Du müsstest jede Folgezeile entsprechend extra lesen.

_________________
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.
Smartie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Mo 27.06.05 11:46 
Danke, das woltle ich wissen.

Entsprechend muß ich das ummodeln.

Lieben Gruß und Danke

Smartie