EasyManuals Logo
Home>Texas Instruments>Computer Hardware>TMS34010

Texas Instruments TMS34010 Reference Guide

Texas Instruments TMS34010
181 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #100 background imageLoading...
Page #100 background image
ASCII
to
Number
atof/atoi/atol
Syntax
#include
<stdlib.h>
double
atof(nptr)
char
*nptr;
int
atoi(nptr)
char
*nptr;
long
int
atol(nptr)
char
*nptr;
Defined
in
atof
. c and
atoi.
c in
rts.
src
Description
Three functions convert ASCII strings
to
numeric representations:
The
atof
function converts a string
to
a
floating-point
value.
Argu-
ment
nptr
points
to
the string; the string must have the
following
format:
[space] [sign] digits [.digits]
[el£
[sign] integer]
The
atoi
function converts a string to
an
integer. Argument
nptr
points
to
the string; the string must have the
following
format:
[space] [sign] digits
The
atol
function converts a string to a long integer. Argument
nptr
points
to
the string; the string must have the
following
format:
[space] [sign] digits
The space
is
indicated by a space (from the space bar), a horizontal
or
ver-
tical tab, a carriage return, a form feed, or a newline. Following the space
is
an
optional sign, and then digits that represent the integer portion
of
the
number. The fractional part
of
the number follows, then the exponent,
in-
cluding
an
optional sign.
The first character that cannot be part
of
the number terminates the string.
Since
int and long
are
functionally equivalent in TMS3401 0
C,
the atoi and
atol functions
are
also functionally equivalent.
The functions
do
not
handle any overflow resulting from the conversion.
6-25

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals