From Clomosy Docs

No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:


<b>Example</b><br>
<b>Example</b><br>
<b>TRObject Syntax</b><br>
 
<pre>
<pre>
var
var
Line 15: Line 15:
   ShowMessage(' Frac(12.75) = '+FloatToStr(Frac(numberValue)));
   ShowMessage(' Frac(12.75) = '+FloatToStr(Frac(numberValue)));
}
}
</pre>
<b>Base Syntax</b><br>
<pre>
var
  numberValue : Integer;
begin
  numberValue := 12.75;
  ShowMessage(' Frac(12.75) = '+FloatToStr(Frac(numberValue)));
end;
</pre>
</pre>


Line 34: Line 24:
<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#Math_Functions | Math Functions]]
* [[System_Library#Math_Functions | Math Functions]]
{{#seo:|title=Frac in Clomosy - Clomosy Docs}}
{{#seo:|description=Learn how to use the Frac function in Clomosy to extract the fractional part of a floating-point number for precise calculations.}}

Latest revision as of 15:06, 24 December 2024

The Frac function returns the fractional part of a floating point number.

Example

var
   numberValue : Integer;
 
{
   numberValue = 12.75;
   ShowMessage(' Frac(12.75) = '+FloatToStr(Frac(numberValue)));
}

Output:

See Also