Autor Beitrag
Fredy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 57

Win Vista Ultimate

BeitragVerfasst: Do 08.01.09 19:29 
Hallo mein problem ist wenn ich das:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
IF label2.Visible := false; then
  begin
  Label3.Hide;
  cb_1A.Hide;
  cb_2A.Hide;
  cb_20M.Hide;
  cb_30M.Hide;
  cb_KAP.Hide
  end;


hab zeigt Delphie mir an Type of expression must be BOOLEAN.

Kann mir jemand sagen was ich falsch mache ?


Danke.

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Do 08.01.2009 um 22:37
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 08.01.09 19:32 
:= ist eine Zuweisung. Der Vergleichsoperator in Delphi ist =. Man beachten den Doppelpunkt beim Zuweisungsoperator.
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: Do 08.01.09 19:32 
Wie wäre es damit?
ausblenden Delphi-Quelltext
1:
if not Label2.Visible then					
:= ist eine Zuweisung und kein Vergleich, zudem solltest du auch keinen Vergleich mit true oder false machen:
www.delphi-treff.de/...olean-werten/page/4/
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Do 08.01.09 19:34 
Ich würde so sagen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
IF label2.Visible := false then
begin
Label3.Visible := false;
cb_1A.Visible := false;
...
end;

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
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: Do 08.01.09 19:34 
user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
Ich würde so sagen:
ausblenden Delphi-Quelltext
1:
IF label2.Visible := false then					
Gleiches Problem. ;-)
(Auch was meinen Link angeht.)
Fredy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 57

Win Vista Ultimate

BeitragVerfasst: Do 08.01.09 19:42 
Vielen Dank funktioniert ein kleinen fehler der großes Bewirken kann ;)