Description |
The Odd function returns true if the given Number is odd (remainder of 1 when divided by 2).
|
|
Related commands |
Boolean |
|
Allows just True and False values |
|
|
|
Example code : Show all odd numbers in the range 1 to 9 |
var
i : Integer;
begin // Display all odd numbers in the range 1 to 9
for i := 1 to 9 do
if Odd(i) then ShowMessageFmt('%d is odd',[i]);
end;
|
Show full unit code |
1 is odd
3 is odd
5 is odd
7 is odd
9 is odd
|
|