![]() |
Pasar un real a un entero
Hola. Soy nuevo en Delphi y quisiera saber como pasar un número real a un entero.
Chau. |
Hola, q tal?
Mira en la ayuda de delphi la función Trunc Description The Trunc function truncates a real-type value to an integer-type value. |
Hola
Si usás trunc el entero se obtiene eliminando la parte decimal pero también es posible obtener un entero usando round. function Round ( const Number : Extended ) : Int64; 12.4 rounds to 12 12.5 rounds to 12 12.6 rounds to 13 En cambio con trunc es: 12.4 truncs to 12 15.5 truncs to 12 12.6 truncs to 12 saludos |
| La franja horaria es GMT +2. Ahora son las 02:08:20. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi