User manual

Table Of Contents
616
mikoC PRO for PIC32
MikroElektronika
atof
Prototype
double atof(char *s);
Description Function converts the input string s into a double precision value and returns the value. Input string
s should conform to the oating point literal format, with an optional whitespace at the beginning. The
string will be processed one character at a time, until the function reaches a character which it doesn’t
recognize (including a null character).
Example
doub = atof(“-1.23”); // doub = -1.23
atoi
Prototype
int atoi(char *s);
Description Function converts the input string s into an integer value and returns the value. The input string s
should consist exclusively of decimal digits, with an optional whitespace and a sign at the beginning.
The string will be processed one character at a time, until the function reaches a character which it
doesn’t recognize (including a null character).
Example
result = atoi(“32000”); // result = 32000
atol
Prototype
long atol(char *s);
Description Function converts the input string s into a long integer value and returns the value. The input string s
should consist exclusively of decimal digits, with an optional whitespace and a sign at the beginning.
The string will be processed one character at a time, until the function reaches a character which it
doesn’t recognize (including a null character).
Example
result = atol(“-32560”); // result = -32560
div
Prototype
div_t div(int number, int denom);
Description Function computes the result of division of the numerator number by the denominator denom; the
function returns a structure of type div_t comprising quotient (quot) and remainder (rem), see Div
Structures.
Example
dt = div(1234,100);