ANSI C Stdlib Library
The mikroBasic PRO for dsPIC30/33 and PIC24 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 |
sub function abs(dim a as integer) as integer |
---|---|
Description |
Function returns the absolute (i.e. positive) value of |
Example |
res = abs(-12) ' res = 12 |
labs
Prototype |
dim function labs(dim x as longint) as longint |
---|---|
Description |
Function returns the absolute (i.e. positive) value of long integer |
Example |
res = labs(-2147483647) ' res = 12 |
min
Prototype |
sub function min(dim a, b as integer) as integer |
---|---|
Description |
Function returns lower of the two integers, |
Example |
res = min(123,67) ' function returns 67 |
max
Prototype |
sub function max(dim a, b as integer) as integer |
---|---|
Description |
Function returns greater of the two integers, |
Example |
res = max(123,67) ' function returns 123 |
rand
Prototype |
sub function rand() as 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 res = rand() wend |
srand
Prototype |
sub procedure srand(dim x as word) |
---|---|
Description |
Function uses |
Example |
srand(9) |
What do you think about this topic ? Send us feedback!