Autor Beitrag
hitmiccs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mo 10.10.05 11:01 
Hallo.

Folgendes Problem, wenn ich in meinem Prog per if-Abfrage folgendes mache:
ausblenden Delphi-Quelltext
1:
2:
if found_error_nm=false and found_error_sm=false then
warnings_text.Caption:='Keine Fehler gefunden!';


dann führt er die Anweisung auch aus, wenn beide bool-variablen auf true stehen... Wie kann ich erreichen, das trotz beiderseitig gleichem Wert die Anweisung bei 2mal true NICHT ausgeführt wird?
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 10.10.05 11:06 
Das "and" bindet enger, als der Vergleichsoperator "=".
Setze einfach Klammern an die richtige Stelle. Dann funktioniert es auch.
hitmiccs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mo 10.10.05 11:13 
Ok, damit klappts:

ausblenden Delphi-Quelltext
1:
2:
  if (found_error_nm=false) and (found_error_sm=false) then
  warnings_text.Caption:='Keine Fehler gefunden!';


Danke für den schnellen Tipp!

Grüße
hitmiccs