Mikroc – ABL electronic PIC Microcontrollers PIC16 User Manual

Page 302

Advertising
background image

mikroC - C Compiler for Microchip PIC microcontrollers

mikroC

making it simple...

294

MikroElektronika: Development tools - Books - Compilers

page

Prototype

int

rand(void);

Description

Function returns a sequence of pseudo-random numbers between 0 and 32767. Function
will always produce the same sequence of numbers unless

srand()

is called to seed the

starting point.

rand

Prototype

void

srand(unsigned seed);

Description

Function uses the seed as a starting point for a new sequence of pseudo-random num-
bers to be returned by subsequent calls to

rand()

. No values are returned by this func-

tion.

srand

Prototype

int

xtoi(char *s);

Description

Function converts the input string

s

consisting of hexadecimal digits into an integer

value. Input parametes

s

should consist exclusively of hexadecimal digits, with an

optional whitespace and a sign at the beginning. The string will be processed one char-
acter at a time, until the function reaches a character which it doesn’t recognize (this
includes a null character).

xtoi

Advertising
This manual is related to the following products: