From Clomosy Docs
No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| Line 29: | Line 29: | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[System_Library#Math_Functions | Math Functions]] | * [[System_Library#Math_Functions | Math Functions]] | ||
{{#seo:|description=Use the Odd function in Clomosy to check if a number is odd.}} | |||
Revision as of 10:34, 24 December 2024
function Odd(X: Integer): Boolean;
The Odd function returns true if the given Number is odd (remainder of 1 when divided by 2).
Example
var
i : Integer;
{
for (i = 1 to 9)
if (Odd(i)) ShowMessage('Odd number :'+IntToStr(i));
}
Output:
Odd number : 1
Odd number : 3
Odd number : 5
Odd number : 7
Odd number : 9