From Clomosy Docs
ClomosyAdmin (talk | contribs) No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| Line 28: | Line 28: | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[System_Library#Math_Functions | Math Functions]] | * [[System_Library#Math_Functions | Math Functions]] | ||
{{#seo:|title=Mod Overview in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Explore the Mod operator in Clomosy. Simplify arithmetic tasks with efficient remainder operations to enhance your app’s functionality.}} | {{#seo:|description=Explore the Mod operator in Clomosy. Simplify arithmetic tasks with efficient remainder operations to enhance your app’s functionality.}} | ||
Latest revision as of 13:01, 24 December 2024
keyword Mod
The mod keyword returns the remainder of the division of two numbers. The integer result of the division is ignored.
Example
In the example, it will return the remainder of dividing 20 by 12. So as a result you will see the value 8 on the screen.
var
dividingNumber,divisor,remainder : Integer;
{
dividingNumber = 20;
divisor = 12;
remainder = dividingNumber Mod divisor;
ShowMessage(IntToStr(dividingNumber)+' Mod '+IntToStr(divisor)+' :'+IntToStr(remainder));
}
Output:
20 Mod 12 : 8