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 ?
Delphi/PASCAL - Extended to integer ?
Started by
goaliemike
, May 18 2007 05:40 PM
2 replies to this topic
#1
Posted 18 May 2007 - 05:40 PM
- tiewherie likes this
#2
Posted 09 June 2007 - 09:36 AM
Something like this:
int x = 10;
String s = new Integer(x).toString();
Or
String.valueOf(x);
Edit: ^^ nvm that was my java snipits
int x = 10;
String s = new Integer(x).toString();
Or
String.valueOf(x);
Edit: ^^ nvm that was my java snipits
Edited by Unknown1, 09 June 2007 - 09:37 AM.
- shacheJeape likes this
#3
Posted 29 June 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
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
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users