RAD Studio
ContentsIndex
PreviousUpNext
_atold, _wtold

Header File 

math.h  

Category 

Conversion Routines, Math Routines 

Prototype 

long double _atold(const char *s); 

long double _wtold(const wchar_t *s); 

Description 

Converts a string to a long double. 

_wtold is the wide-character version. It converts a wide-character string to a long double. 

_atof is the floating-point version of _atold. 

_atold converts a string pointed to by s to a long double; this functions recognizes: 

An optional string of tabs and spaces 

An optional sign 

A string of digits and an optional decimal point 

An optional e or E followed by an optional signed integer 

The first unrecognized character ends the conversion. There are no provisions for overflow. 

The functions strtod and _strtold are similar to atof and _atold; they provide better error detection, and hence are preferred in some applications. 

Return Value 

Returns the converted value of the input string. 

If there is an overflow, _atold returns plus or minus HUGE_VAL (or _LHUGE_VAL), errno is set to ERANGE (Result out of range), and _matherr (or _matherrl) is not called. 

Portability  

 
POSIX 
Win32 
ANSI C 
ANSI C++ 
_atold 
 
 
 
_wtold 
 
 
 
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!