**Function: Math_Power(num:Integer, index:Integer)**Returns the power of a number with a specified exponent/indexWARNING: Don't think this is a real math function. Exponents must be plain integers (1,2,3), don't try to use something like 0,3 because its not programmed like that, sadly.

Any enhancements are welcome.**Code:**

//Returns the power of a number with a specified exponent/index

Export Function Math_Power(number,index);

var i;

begin

if index < 1 then

result := 1 //Anything to the power of 0 is 1.

else

result := Number;

if index > 1 then

for i=1 to index-1 do

begin

result:=result*number;

end;

end;

Dedicated to McBenn. He might already solved this by himself. I remember he was wondering time ago.

And this is not mine. I googled it and then adapted it to OW. But hey, I'm posting it here.

Even more, the example that I googled had a flaw I had to fix, hehe.