Inline Functions
Any programming language includes many built-in functions that can be used in arithmetic expressions.
To use additional functions, you often need to include additional libraries.
For example, the most commonly used standard mathematical functions and how they are written in Pascal
abs(i)
number module i
;
sqrt(x)
square root of x
;
power(x,y)
calculates
x
to the power of
y
(always returns a real number).
It must be remembered that the
function argument is always written in brackets.
For the
power()
function to work, you need to connect an additional mathematical library.
You can do this by adding a line before the variable declaration:
uses math;
var ...