From Clomosy Docs

No edit summary
No edit summary
 
(3 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 16: Line 16:
     if (Odd(i)) ShowMessage('Odd number :'+IntToStr(i));
     if (Odd(i)) ShowMessage('Odd number :'+IntToStr(i));
  }
  }
</pre>
<b>Base Syntax</b><br>
<pre>
var
  i : Integer;
begin
  for i := 1 to 9 do
    if Odd(i) then ShowMessage('Odd number :'+IntToStr(i));
end;
</pre>
</pre>


Line 41: Line 29:
<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#Math_Functions | Math Functions]]
* [[System_Library#Math_Functions | Math Functions]]
{{#seo:|title=Odd Using in Clomosy - Clomosy Docs}}
{{#seo:|description=The Odd function in Clomosy determines whether a given number is odd, providing a simple and efficient way to handle such checks in your application.}}

Latest revision as of 11:56, 8 January 2025

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:

See Also