![]() |
Konstantenausdruck erwartet
Delphi-Quellcode:
beim end unter der if anweisung kommt -> [Fehler] Unit1.pas(184): Konstantenausdruck erwartet
procedure Stufen;
begin count:= count +1; with Form1 do begin case count of 1: begin Lb_Stufe1.Font.color := clred; Lb_Stufe15.Font.color := clWhite; end; 2: begin Lb_Stufe2.Font.color := clred; Lb_Stufe1.Font.color := clWhite; end; 3: begin Lb_Stufe3.Font.color := clred; Lb_Stufe2.Font.color := clWhite; end; 4: begin Lb_Stufe4.Font.color := clred; Lb_Stufe3.Font.color := clWhite; end; 5: begin Lb_Stufe5.Font.color := clred; Lb_Stufe4.Font.color := clWhite; end; 6: begin Lb_Stufe6.Font.color := clred; Lb_Stufe5.Font.color := clWhite; end; 7: begin Lb_Stufe7.Font.color := clred; Lb_Stufe6.Font.color := clWhite; end; 8: begin Lb_Stufe8.Font.color := clred; Lb_Stufe7.Font.color := clWhite; end; 9: begin Lb_Stufe9.Font.color := clred; Lb_Stufe8.Font.color := clWhite; end; 10: begin Lb_Stufe10.Font.color := clred; Lb_Stufe9.Font.color := clWhite; end; 11: begin Lb_Stufe11.Font.color := clred; Lb_Stufe10.Font.color := clWhite; end; 12: begin Lb_Stufe12.Font.color := clred; Lb_Stufe11.Font.color := clWhite; end; 13: begin Lb_Stufe13.Font.color := clred; Lb_Stufe12.Font.color := clWhite; end; 14: begin Lb_Stufe14.Font.color := clred; Lb_Stufe13.Font.color := clWhite; end; 15: begin Lb_Stufe15.Font.color := clred; Lb_Stufe14.Font.color := clWhite; end; if count = 15 then begin Frage1.Visible := false; Frage2.Visible := false; Frage3.Visible := false; Frage4.Visible := false; end; end; end; end; ich hab mal end; weggenommen, welche hinzugefügt, aber nix passiert...immer die meldung (s.o) :wall: |
Re: Konstantenausdruck erwartet
Schreib mal anstatt:
Delphi-Quellcode:
folgendes:
15: begin
Lb_Stufe15.Font.color := clred; Lb_Stufe14.Font.color := clWhite; end; if count = 15 then begin Frage1.Visible := false; Frage2.Visible := false; Frage3.Visible := false; Frage4.Visible := false; end; end; end; end;
Delphi-Quellcode:
Ungetestet.
15: begin
Lb_Stufe15.Font.color := clred; Lb_Stufe14.Font.color := clWhite; end; end; if count = 15 then begin Frage1.Visible := false; Frage2.Visible := false; Frage3.Visible := false; Frage4.Visible := false; end; end; end; |
Re: Konstantenausdruck erwartet
Was hast du denn gegen die
![]() |
Re: Konstantenausdruck erwartet
ausser dem hast du da irgendwie:
Delphi-Quellcode:
mach doch so:
case count of
...usw... 15: begin Lb_Stufe15.Font.color := clred; Lb_Stufe14.Font.color := clWhite; end; if count = 15 then begin Frage1.Visible := false; Frage2.Visible := false; Frage3.Visible := false; Frage4.Visible := false; end;
Delphi-Quellcode:
oder wo ist der unterschied?
case count of
...usw... 15: begin Lb_Stufe15.Font.color := clred; Lb_Stufe14.Font.color := clWhite; Frage1.Visible := false; Frage2.Visible := false; Frage3.Visible := false; Frage4.Visible := false; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:38 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz