beautypg.com

Frexp, Getchar, Frexp getchar – Zilog Z8F0130 User Manual

Page 464

background image

Appendix B. C Standard Library

UM013037-1212

440

Zilog Developer Studio II – Z8 Encore!
User Manual

space has been deallocated by a call to

free

or

realloc

, the behavior is undefined. If

freed space is referenced, the behavior is undefined.

Synopsis

#include

void free(void *ptr);

Example

char *buf;

buf=(char*) calloc(40, sizeof(char));

free(buf);

frexp

Breaks a floating-point number into a normalized fraction and an integral power of 2. It
stores the integer in the

int

object pointed to by

exp

.

Synopsis

#include *

double frexp(double value, int *exp);

Returns

The value x, such that x is a

double

with magnitude in the interval [1/2, 1] or zero, and

value equals x times 2 raised to the power *exp. If value is zero, both parts of the result are
zero.

Example

double y, x=16.4;

int n;

y=frexp(x,&n);

getchar

Waits for the next character to appear at the serial port and return its value.

Synopsis

#include

int getchar(void);