Power function
Prototype: |
function Power(X, Y: extended): extended; |
|
Description: |
The Power function raises the Base to the power specified by the Y parameter. For fractional exponents or exponent Bases it must be greater than 0. |
|
Syntax: |
Power(X,Y); / variable:= Power(X,Y); |
|
Part |
Description |
|
variable |
A variable declared as extended |
|
X |
Base |
|
Y |
Exponent |
|
Return value: |
The result of the calculation as an extended value |
|
Example:
var
x,y,z1,z2 : extended;
s: string;
begin
x:= 4;
y:= 2;
z1:= Power(x,y);
z2:= Power(2,3);
s:= Format('%.2f^%.2f = %.2f' #13#10 '2^3 = %.2f', [x,y,z1, z2]); // seeFormatfunction
ShowMessage(s);
end.
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