goaliemike
May 18 2007, 05:40 PM
Hi, ive been working on Delphi for my school's programming course. We have to create a game out of stuff we learned, tho its not the best to use its still fun. Now im stuck with a extended variable that i need to convert into a integer. I have looked for a while, the best i found is that a extended variable is a longer integer... How can i convert it ?
Something like this:
int x = 10;
String s = new Integer(x).toString();
Or
String.valueOf(x);
Edit: ^^ nvm that was my java snipits
erpizn13
Jun 29 2007, 12:54 AM
Hey, I'm probably late, but did not see answer to your qtn, so here is my post!
Type-cast:
var
x: Extended;
y: Integer;
...
y := Integer(x);
Round/Ceil/Floor:
var
x: Extended;
y: Integer;
...
y := Round(x); //uses System
y := Ceil(x); //uses Math
y := Floor(x); //uses Math
-erpizn13