Autor Beitrag
KeinePanik
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 131



BeitragVerfasst: Fr 30.08.02 23:35 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
var VariableA, VariableB: string;
      reg:tregistry;
begin
//bla bla eben Registry öffnen, key usw.

// Um die 2 folgenden Zeilen gehts eigentlich ...
if VariableA=reg.ReadString('Eintrag1') and
   VariableB=reg.readstring('Eintrag2') then


begin
//Hier dann eben, wenn beide Ausdrücke true sind
...

end;
end;


VariableA und B wurden beim Programmstart mit den Registryeinträgen ''Eintrag1 und 2'' gefüttert ... Der Text soll nun also überprüfen, ob sich was geändert hat ... ''VariableA=reg.ReadString('Eintrag1')'' gibt ja einen boolschen Wert zurück und die andere Zeile auch ... also wenn Zeile A true ist und (and) Zeile B ebenfalls, soll er die folgenden Zeile ausführen ...

Ich bekomme allerdings immer den Fehler :[Fehler] Unit1.pas(166): Operator ist auf diesen Operandentyp nicht anwendbar

... Wo liegt jetzt mein Fehler ???

_________________
Es gibt keine dummen Fragen ... Nur blöde Antworten !!!
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Sa 31.08.02 00:02 
Hallo,

versuche es mal mit Klammern:

ausblenden Quelltext
1:
2:
if (VariableA=reg.ReadString('Eintrag1')) and
  (VariableB=reg.readstring('Eintrag2')) then


Gruß
Klabautermann
KeinePanik Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 131



BeitragVerfasst: Sa 31.08.02 00:06 
Yes ... Funzt ! ... Hätt ich auch selbst drauf kommen können ... Manchmal denkt man zu kompiziert :roll:

_________________
Es gibt keine dummen Fragen ... Nur blöde Antworten !!!
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Sa 31.08.02 00:42 
Reine übungssache.

Aber besser eine Klammerung zu viel als eine zu wenig.

Gruß
Klabautermann