Autor Beitrag
MDX
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Mi 21.05.08 15:35 
Wie kann man eine IF-Abfrage mit einer INI-Datei gestalten???

ausblenden Delphi-Quelltext
1:
  if ini.ReadString('UPDATE','auto','true') then					


Dat funktioniert nicht so...

Aber ich bin mir sicher in 2 Minuten hat schon jemand ne Antwort gepostet!


xD


Edit: mhhh...
ZeitGeist87 ist nimmer da...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 21.05.08 15:41 
AFAIK gibt es auch ReadBoolean und WriteBoolean ;-).
// EDIT:
ReadBool und WriteBool heißt es.
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Mi 21.05.08 15:44 
ausblenden Delphi-Quelltext
1:
 if ini.ReadBoolean('UPDATE','auto','true') then					


das bringt folgene Fehlermeldung:

Zitat:
Build
[Error] Unit6.pas(55): Undeclared identifier: 'ReadBoolean'
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Mi 21.05.08 15:45 
user profile iconjaenicke hat folgendes geschrieben:
AFAIK gibt es auch ReadBoolean und WriteBoolean ;-).
// EDIT:
ReadBool und WriteBool heißt es.


Okay, aber:

ausblenden Delphi-Quelltext
1:
  if ini.ReadBool('UPDATE','auto','true') then					


Fehlermeldung:
Zitat:
[Error] Unit6.pas(55): Incompatible types: 'Boolean' and 'String'
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 21.05.08 15:45 
Schau dir mal die Parameter von ReadBool an, das sind nicht alles Strings ;-).
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Mi 21.05.08 15:48 
Habs jetzt so gemacht, geht:

ausblenden Delphi-Quelltext
1:
if ini.ReadBool('UPDATE','auto',true) then