ANSI C Stdlib Library
The mikroPascal PRO for PIC provides a set of standard ANSI library functions of general utility.

- Not all of the standard ANSI library functions have been included.
Library Dependency Tree

Library Functions
abs
Prototype |
function abs(a : integer) : integer; |
---|---|
Description |
Function returns the absolute (i.e. positive) value of |
Example |
res := abs(-12); // res = 12 |
labs
Prototype |
function labs(x : longint) : longint; |
---|---|
Description |
Function returns the absolute (i.e. positive) value of long integer |
Example |
res := labs(-2147483647); // res = 12 |
min
Prototype |
function min(a, b : integer) : integer; |
---|---|
Description |
Function returns lower of the two integers, |
Example |
res := min(123,67); // function returns 67 |
max
Prototype |
function max(a, b : integer) : integer; |
---|---|
Description |
Function returns greater of the two integers, |
Example |
res := max(123,67); // function returns 123 |
rand
Prototype |
function rand() : integer; |
---|---|
Description |
Function returns a sequence of pseudo-random numbers between 0 and 32767. The function will always produce the same sequence of numbers unless srand is called to seed the start point. |
Example |
while TRUE do res := rand(); end; |
srand
Prototype |
procedure srand(x : word); |
---|---|
Description |
Function uses |
Example |
srand(9); |
What do you think about this topic ? Send us feedback!