From Clomosy Docs

No edit summary
No edit summary
 
Line 24: Line 24:
<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#Math_Functions | Math Functions]]
* [[System_Library#Math_Functions | Math Functions]]
{{#seo:|title=Trunc Using in Clomosy - Clomosy Docs}}
{{#seo:|description=Trunc in Clomosy simplifies number management by truncating decimals, ensuring your mobile apps handle numbers efficiently and without errors.}}
{{#seo:|description=Trunc in Clomosy simplifies number management by truncating decimals, ensuring your mobile apps handle numbers efficiently and without errors.}}

Latest revision as of 13:25, 24 December 2024

The Trunc function returns the integer part of a floating point number. It returns this part as an Integer value.

Example

 var
   valueNumber : Float;
 
 {
   valueNumber = 12.60;
   ShowMessage('Trunc('+ FloatToStr(valueNumber) +') = '+IntToStr(Trunc(valueNumber)));
 }

Output:

See Also