Getchar, Synopsis, Returns – Zilog ZUSBOPTS User Manual
Page 446: Example

Standard Functions
UM017105-0511
418
Zilog Developer Studio II – ZNEO™
User Manual
Synopsis
#include
double frexp(double value, int *exp);
float frexpf(float value, int *exp);
Returns
The value x, such that x is a
double
(
frexp
) or
float
(
frexpf
) 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);
Returns
The next character from the input stream pointed to by stdin. If the stream is at end-of-file,
the end-of-file indicator for the stream is set, and
getchar
returns EOF. If a read error
occurs, the error indicator for the stream is set, and
getchar
returns EOF.
Example
int i;
i=getchar();
The UART must be initialized using the Zilog
init_uart()
function. See the
Note: