Autor Beitrag
tim4vfb
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Do 09.09.04 07:54 
Hallo habe folgendes Problem.

ausblenden Quelltext
1:
ProgressGauge.Progress := ProgressGauge.Progress + ProgressGauge.MaxValue/NumberOfItems;					


Der Code führt zu dem Fehler "Inkompatible Typen: 'Integer' und 'Extended'", jedoch müsste doch alles Integer sein, finde da kein Extended.
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Do 09.09.04 07:57 
Die Division mit dem Schrägstrich liefert aber einen Extended-Wert zurück. Entweder machst du ein "Round" drumherum oder du dividierst mit div.

Gruß,
Jörg

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
tim4vfb Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Do 09.09.04 07:58 
Danköööö!!
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Do 09.09.04 07:59 
Hallo,

Du darfst bei einer Intergerdivision nicht x/y sondern musst x div y schreiben. In Deinerm Beispiel:
ausblenden Delphi-Quelltext
1:
ProgressGauge.Progress := ProgressGauge.Progress + ProgressGauge.MaxValue div NumberOfItems					

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)