beautypg.com

Gets, Isalnum, Gets isalnum – Zilog ZUSBOPTS User Manual

Page 447: Synopsis, Returns, Example

background image

UM017105-0511

Standard Functions

Zilog Developer Studio II – ZNEO™

User Manual

419

gets

Reads characters from the input stream into the array pointed to by

s

, until end-of-file is

encountered or a new-line character is read. The new-line character is discarded, and a null
character is written immediately after the last character read into the array.

Synopsis

#include

char *gets(char *s);

Returns

The value of

s

, if successful. If a read error occurs during the operation, the array contents

are indeterminate, and a null pointer is returned.

Example

char *r;

char buf [80];

r=gets(buf);

if (r==NULL)

/*No input*/

The UART must be initialized using the Zilog

init_uart()

function. See the

init_uart

command

on page 182.

isalnum

Tests for any character for which

isalpha

or

isdigit

is true.

Synopsis

include

int isalnum(int c);

Example

int r;

char c='a';

r=isalnum(c);

Note:

This manual is related to the following products: