Mail Archives: djgpp/1997/06/06/17:18:28
Guilherme Silveira wrote:
> There's the way to convert from float to int:
>
> Function FCVT (propabily Float Converter)
...
Bizarre. First, this doesn't answer the question. fcvt would convert a
double to a _string_, not an int. Last I heard, "string" and "int" don't
mean the same thing. Second, fcvt is Borland-specific and not ANSI C. As
such, it's not a very good suggested, even if it solved the problem the
original poster was asking about.
The correct (and trivially simple) thing to do is a typecast:
float f = /* ... */;
int i = (int) f;
--
Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"Covenants without the sword / are but words."
/ Camden
- Raw text -