beautypg.com

General utilities

Page 431

background image

UM017105-0511

Standard Header Files

Zilog Developer Studio II – ZNEO™

User Manual

403

General Utilities

The <

stdlib.h

> header declares several types, functions of general utility, and macros.

Types

Macros

Functions

String Conversion

The

atof

,

atoi

, and

atol

functions do not affect the value of the errno macro on an

error. If the result cannot be represented, the behavior is undefined.

div_t

Structure type that is the type of the value returned by the div function.

ldiv_t

Structure type that is the type of the value returned by the ldiv function.

size_t

Unsigned integral type of the result of the sizeof operator.

wchar_t

Integral type whose range of values can represent distinct codes for all
members of the largest extended character set specified among the sup-
ported locales.

EDOM

Expands to distinct nonzero integral constant expressions.

ERANGE

Expands to distinct nonzero integral constant expressions.

EXIT_SUCCESS

Expands to integral expression which indicates successful termina-
tion status.

EXIT_FAILURE

Expands to integral expression which indicates unsuccessful termi-
nation status.

HUGE_VAL

Expands to a positive double expression, not necessarily repre-
sented as a float.

NULL

Expands to a null pointer constant.

RAND_MAX

Expands to an integral constant expression, the value of which is
the maximum value returned by the rand function.

double atof(const char *nptr);

Converts string to double.

int atoi(const char *nptr);

Converts string to int.

long int atol(const char *nptr);

Converts string to long.

This manual is related to the following products: