Autor Beitrag
claudi89
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Sa 21.01.06 15:24 
hallo kann mir jemand sagen wo in zeile 7 der fehler ist, delphi zeigt foldende fehlermeldung: operator is not applicable to this operand type

kann mir da vielleicht jemand helfen???

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm15.Button_AufgabeStellenClick(Sender: TObject);
begin
randomize;
REPEAT
Zahl1:=(random(10000)+1)/100 ;
Zahl2:=(random(10000)+1)/100 ;
until (Zahl1 MOD Zahl2=0) and (Zahl1>Zahl2));

result:=Zahl1 / Zahl2;
Label_AufgabeAusgeben.caption:=FloatToStr(Zahl1)+' / '+FloatToStr(Zahl2);
end;



Moderiert von user profile iconGausi: Topic aus Sonstiges (Delphi) verschoben am Sa 21.01.2006 um 15:31
Allesquarks
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 510

Win XP Prof
Delphi 7 E
BeitragVerfasst: Sa 21.01.06 15:25 
Da fehlt noch ne Klammer nach dem until
claudi89 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Sa 21.01.06 15:27 
die hab ich schon ergänzt aber trotzdem gibt er die selbe fehlermeldung aus
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: Sa 21.01.06 15:31 
Mod geht nur mit Ganzzahl-Typen, denn nur da macht das Sinn. Also: Zahl1 und Zahl2 als Integer deklarieren und / durch DIV ersetzen, oder die Abbruchbedingung ändern.

_________________
We are, we were and will not be.