Autor Beitrag
xus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 27.05.07 12:27 
hi!

ich habe folgendes probiert:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TForm3.Button4Click(Sender: TObject);
begin
//zahl:=random(37);

//if zahl=0 then label2.caption:='Ergebnis: ' + inttostr(Zahl) + ' Grün You have lost!'

//else
//if zahl < 18 and zahl mod(2)=0 then label2.caption:='Ergebnis: ' + inttostr(Zahl) + ' Rot You have won!'

//else
//if zahl < 18 and zahl mod(2)<>0 then label2.caption:='Ergebnis: ' + inttostr(Zahl) + ' Schwarz You have won!'

//else
//if zahl > 18 and zahl mod(2)=0 then label2.caption:='Ergebnis: ' + inttostr(Zahl) + ' Rot You have lost!'

//else
//if zahl > 18 and zahl mod(2)<>0 then label2.caption:='Ergebnis: ' + inttostr(Zahl) + ' Schwarz You have lost!!';


ich möchte in einer if funktion 2 abfragen haben!
was ist dafür nötig?

mfg XuS

Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 27.05.07 12:30 
Da muss man klammern:
ausblenden Delphi-Quelltext
1:
if (zahl > 18) and (zahl mod(2)=0) then ...					

_________________
We are, we were and will not be.
xus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: So 27.05.07 12:34 
danke!!

mfg XuS
HelgeLange
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 735
Erhaltene Danke: 6

Windows 7
Delphi7 - Delphi XE
BeitragVerfasst: So 27.05.07 13:14 
man kann auch :

ausblenden Delphi-Quelltext
1:
If (((A>B) And (B>C)) Or (C=A))					


:D

_________________
"Ich bin bekannt für meine Ironie. Aber auf den Gedanken, im Hafen von New York eine Freiheitsstatue zu errichten, wäre selbst ich nicht gekommen." - George Bernhard Shaw