Autor Beitrag
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 01.05.04 09:46 
Ich will einen kleinen Währungsrechner machen und dazu muss ich eine Zahl durch 0,6737 teilen.
Mach ich das mit "div", sagt mir Delphi "Division durch Null"
Wie kann ich trotzdem durch 0,6737 teilen?
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Sa 01.05.04 09:52 
Hi,

einfach mit

ausblenden Delphi-Quelltext
1:
ergebniss := wert1 / wert2;					


Das mit div ist eine ganzzahlen Division. Heißt also das die Nachkommastellen nicht beachtet werden.