Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: So 20.03.05 20:38 
Hi hallo finde einfach den Fehler nich
ausblenden Delphi-Quelltext
1:
2:
IF Edit1.Text= Floattostr (ergebnis) then  Button2.Enabled:= True and Button1.Enabled:= False else
Showmessage('Falsch :( ');

Die Linie wird immer Rot Markiert.
Hilfe :crying:
ScorpionKing
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1150

Win XP

BeitragVerfasst: So 20.03.05 20:40 
user profile iconDelphiDelphin hat folgendes geschrieben:
Hi hallo finde einfach den Fehler nich
ausblenden Delphi-Quelltext
1:
2:
IF Edit1.Text= Floattostr (ergebnis) then  Button2.Enabled:= True and Button1.Enabled:= False else
Showmessage('Falsch :( ');

Die Linie wird immer Rot Markiert.
Hilfe :crying:


der code ist leicht komisch, oder?
was macht das and denn da?

MfG, ScorpionKing!

_________________
Aus dem Urlaub zurück!
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: So 20.03.05 20:43 
Ohne and geht es erst recht nicht ich hab es auch schon mit + versucht geht auch nicht
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: So 20.03.05 20:43 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  if Edit1.Text = Floattostr(ergebnis) then
    begin
      Button2.Enabled:= True; 
      Button1.Enabled:= False;
    end else  
      Showmessage('Falsch :( ');
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: So 20.03.05 20:45 
ausblenden Delphi-Quelltext
1:
Button2.Enabled := True and Button1.Enabled := False					

Ist das PHP-Syntax? Wenn du mehrere Befehle nach then willst, musst du ein begin..end drumherum machen!
"and" ist ein Operator, mit welchem du zwei Booleans oder Zahlen verknüpfen kannst - aber nicht zwei Zuweisungen!


Zuletzt bearbeitet von delfiphan am So 20.03.05 20:46, insgesamt 1-mal bearbeitet