Odd function
Prototype: |
function Odd(const X: integer): boolean; |
|
Description: |
The Odd function returns true if parameter X is a odd number. Otherwise returns false. In other words: if the number is divided by two, is not odd (but a even number). |
|
Syntax: |
Odd(X); / variable:= Odd(X); |
|
Part |
Description |
|
variable |
A variable declared as boolean |
|
X |
An integer parameter |
|
Return value: |
True if X is a odd number, otherwise returns false |
|
Note: This function is available since version X7.
Example:
var
x : integer;
b : boolean;
begin
x:= 1;
b:= Odd(x);
if b <> true then
begin
ShowMessage(IntToStr(x) + ' is not odd number');
end
else
begin
ShowMessage(IntToStr(x) + ' is odd number');
end;
end.
// Next examples: Odd(2) = false
// Odd(0) = false
// Odd(-3) = true
Output in Field-Map Data Collector:

See also:
Power; Round; RoundTo, RoundVariant; Round2int, Cos; ArcCos; ArcCosH; Sin; ArcSin; ArcSinH; ArcTan; ArcTan2; ArcTanH; CosH; SinH; Tan; TanH; Random; RandomRange; Randomize; Floor; Ceil; Int; Frac; Log10; Ln; Exp; Abs; Min; Max; Odd; SecondsBetween;CompareValue; SameValue; Trunc
© 2024 IFER-Monitoring and Mapping Solutions