Autor Beitrag
abi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 121

Windows 2000
Delphi 5
BeitragVerfasst: Fr 02.07.04 12:39 
Hallo
ich hoffe der Titel passt einiger Massen denn ich weiss gar nicht was mein eigentliches Problem ist.

Ich habe einen String, der sieht so aus
ausblenden Delphi-Quelltext
1:
s := '64';					

Diesen möchte ich jetzt als Interwert haben.
ausblenden Delphi-Quelltext
1:
I := StrToInt(s);					

Jetzt möchte ich diesen Wert durch 0,64 teilen.
ausblenden Delphi-Quelltext
1:
erg := I div 0.64;					


Aber des geht nicht, kann ich des mit dem Integer machen und was für ein Typ muss erg sein.

Danke
abi


Moderiert von user profile iconPeter Lustig: Topic aus VCL (Visual Component Library) verschoben am Fr 02.07.2004 um 14:15
Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt.

_________________
Die lansamste Schnecke kommt auch irgendwann an.
MartinPb
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 698



BeitragVerfasst: Fr 02.07.04 12:42 
div ist um Integer zu teilen. Das gemeine / ist für Realzahlen.

_________________
Gruß
Martin
abi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 121

Windows 2000
Delphi 5
BeitragVerfasst: Fr 02.07.04 12:45 
Hallo Martin
hab immer gedacht des gibt einfach nicht.

Kannst du mir dann noch sagen, wie ich jetzt noch meinen Wert ausgeben kann.
...ToStr(erg)?????????

Danke
abi

_________________
Die lansamste Schnecke kommt auch irgendwann an.
MartinPb
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 698



BeitragVerfasst: Fr 02.07.04 12:49 
FloatToStr()

_________________
Gruß
Martin
abi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 121

Windows 2000
Delphi 5
BeitragVerfasst: Fr 02.07.04 12:51 
Danke nochmal.
abi

_________________
Die lansamste Schnecke kommt auch irgendwann an.